Skip to content

Commit 9f4fcca

Browse files
committed
Fix
1 parent fe39d82 commit 9f4fcca

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"require": {
99
"php": "~7.1",
10-
"phpstan/phpstan": "^0.12"
10+
"phpstan/phpstan": "^0.12.26"
1111
},
1212
"conflict": {
1313
"nette/application": "<2.3.0",

src/Rule/Nette/RethrowExceptionRule.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function processNode(Node $node, Scope $scope): array
6666
count($catch->stmts) === 1
6767
&& $catch->stmts[0] instanceof Node\Stmt\Throw_
6868
&& $catch->stmts[0]->expr instanceof Variable
69+
&& $catch->var !== null
6970
&& is_string($catch->var->name)
7071
&& is_string($catch->stmts[0]->expr->name)
7172
&& $catch->var->name === $catch->stmts[0]->expr->name

0 commit comments

Comments
 (0)