File tree Expand file tree Collapse file tree
NodeTypeResolver/PHPStan/Scope/NodeVisitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55namespace Rector \NodeTypeResolver \PHPStan \Scope \NodeVisitor ;
66
7+ use PhpParser \Node \Expr \Isset_ ;
78use PhpParser \Node ;
89use PhpParser \Node \Arg ;
910use PhpParser \Node \Attribute ;
@@ -61,13 +62,15 @@ public function enterNode(Node $node): ?Node
6162 foreach ($ node ->vars as $ var ) {
6263 $ var ->setAttribute (AttributeKey::IS_UNSET_VAR , true );
6364 }
65+
6466 return null ;
6567 }
6668
67- if ($ node instanceof Node \ Expr \ Isset_) {
69+ if ($ node instanceof Isset_) {
6870 foreach ($ node ->vars as $ var ) {
6971 $ var ->setAttribute (AttributeKey::IS_ISSET_VAR , true );
7072 }
73+
7174 return null ;
7275 }
7376
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ final public function enterNode(Node $node): int|Node|null
183183 * Replacing nodes in leaveNode() method avoids infinite recursion
184184 * see"infinite recursion" in https://github.com/nikic/PHP-Parser/blob/master/doc/component/Walking_the_AST.markdown
185185 *
186- * @return \PhpParser\ Node|\PhpParser\ Node[]|NodeVisitor::REMOVE_NODE|null
186+ * @return Node|Node[]|NodeVisitor::REMOVE_NODE|null
187187 */
188188 final public function leaveNode (Node $ node ): array |int |Node |null
189189 {
You can’t perform that action at this time.
0 commit comments