Skip to content

Commit

Permalink
fix: RequestValidateFacade Variable could not be converted to string (#…
Browse files Browse the repository at this point in the history
…925)

Co-authored-by: Thibault GRANADA <[email protected]>
  • Loading branch information
TZK- and Thibault GRANADA authored Dec 8, 2024
1 parent 46e8399 commit e8267c9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ public static function find(Node $node)

if (
$expr instanceof Node\Expr\StaticCall
&& in_array((string) $expr->class, ['Request', \Illuminate\Support\Facades\Request::class])
&& $expr->class instanceof Node\Name
&& in_array($expr->class->name, ['Request', \Illuminate\Support\Facades\Request::class])
) {
if ($expr->name->name == "validate") {
if ($expr->name->name === "validate") {
return $expr->args[0]->value;
}

if ($expr->name->name == "validateWithBag") {
if ($expr->name->name === "validateWithBag") {
return $expr->args[1]->value;
}
}
Expand Down

0 comments on commit e8267c9

Please sign in to comment.