Skip to content

Commit

Permalink
Update nikic/PHP-Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 26, 2023
1 parent 8937f3e commit 79b3034
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"nette/neon": "^3.3.1",
"nette/schema": "^1.2.2",
"nette/utils": "^3.2.5",
"nikic/php-parser": "^4.15.5",
"nikic/php-parser": "^4.16",
"ondram/ci-detector": "^3.4.0",
"ondrejmirtes/better-reflection": "6.11.0.1",
"phpstan/php-8-stubs": "0.3.60",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
]);
}

if ($callbackArg === null || ($callbackArg instanceof ConstFetch && strtolower($callbackArg->name->parts[0]) === 'null')) {
if ($callbackArg === null || ($callbackArg instanceof ConstFetch && strtolower($callbackArg->name->getParts()[0]) === 'null')) {
return TypeCombinator::union(
...array_map([$this, 'removeFalsey'], $arrayArgType->getArrays()),
);
Expand All @@ -89,7 +89,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
}
}

if ($flagArg instanceof ConstFetch && $flagArg->name->parts[0] === 'ARRAY_FILTER_USE_KEY') {
if ($flagArg instanceof ConstFetch && $flagArg->name->getParts()[0] === 'ARRAY_FILTER_USE_KEY') {
if ($callbackArg instanceof Closure && count($callbackArg->stmts) === 1 && count($callbackArg->params) > 0) {
$statement = $callbackArg->stmts[0];
if ($statement instanceof Return_ && $statement->expr !== null) {
Expand All @@ -104,7 +104,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
}
}

if ($flagArg instanceof ConstFetch && $flagArg->name->parts[0] === 'ARRAY_FILTER_USE_BOTH') {
if ($flagArg instanceof ConstFetch && $flagArg->name->getParts()[0] === 'ARRAY_FILTER_USE_BOTH') {
if ($callbackArg instanceof Closure && count($callbackArg->stmts) === 1 && count($callbackArg->params) > 0) {
$statement = $callbackArg->stmts[0];
if ($statement instanceof Return_ && $statement->expr !== null) {
Expand Down

0 comments on commit 79b3034

Please sign in to comment.