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
  • Loading branch information
Thibault GRANADA committed Dec 4, 2024
1 parent 46e8399 commit e839b12
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 e839b12

Please sign in to comment.