Skip to content

Commit

Permalink
Fix compatibility with PHPStan >=1.10.51
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jan 9, 2024
1 parent 9f194f6 commit 5e20851
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
"php": "^7.4 || ^8.0",
"nikic/php-parser": "^4.14.0",
"phpstan/phpstan": "^1.10.30"
"phpstan/phpstan": "^1.10.51"
},
"require-dev": {
"editorconfig-checker/editorconfig-checker": "^10.3.0",
Expand Down
20 changes: 10 additions & 10 deletions composer.lock

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

2 changes: 2 additions & 0 deletions src/Rule/ForbidCheckedExceptionInCallableRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Expression;
use PHPStan\Analyser\ExpressionContext;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\NodeScopeResolver;
Expand Down Expand Up @@ -210,6 +211,7 @@ public function processArrowFunction(
}

$result = $this->nodeScopeResolver->processExprNode( // @phpstan-ignore-line ignore BC promise
new Expression($node->expr),
$node->expr,
$scope->enterArrowFunction($node),
static function (): void {
Expand Down

0 comments on commit 5e20851

Please sign in to comment.