Skip to content

Commit

Permalink
Merge pull request #17 from AndreasElia/fix/non-class-params
Browse files Browse the repository at this point in the history
  • Loading branch information
tomirons authored Feb 20, 2021
2 parents 1b4b5b5 + 5033733 commit 7202f31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/ExportPostmanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function handle(): void

if ($firstParameter) {
$requestClass = $firstParameter->getType()->getName();
$requestClass = new $requestClass();
$requestClass = class_exists($requestClass) ? new $requestClass() : null;

if ($requestClass instanceof FormRequest) {
$requestRules = $requestClass->rules();
Expand Down

0 comments on commit 7202f31

Please sign in to comment.