Skip to content

Commit 79b3034

Browse files
committed
Update nikic/PHP-Parser
1 parent 8937f3e commit 79b3034

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"nette/neon": "^3.3.1",
2222
"nette/schema": "^1.2.2",
2323
"nette/utils": "^3.2.5",
24-
"nikic/php-parser": "^4.15.5",
24+
"nikic/php-parser": "^4.16",
2525
"ondram/ci-detector": "^3.4.0",
2626
"ondrejmirtes/better-reflection": "6.11.0.1",
2727
"phpstan/php-8-stubs": "0.3.60",

composer.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Type/Php/ArrayFilterFunctionReturnTypeReturnTypeExtension.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
6868
]);
6969
}
7070

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

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

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

0 commit comments

Comments
 (0)