Skip to content

Commit bed985c

Browse files
committed
remove local attribute on GetClassOnNullRector
1 parent 19a4c03 commit bed985c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"rector/type-perfect": "^2.1",
5757
"shipmonk/composer-dependency-analyser": "^1.8",
5858
"symplify/phpstan-extensions": "^12.0.2",
59-
"symplify/phpstan-rules": "^14.9.3",
59+
"symplify/phpstan-rules": "dev-main#669b317",
6060
"symplify/vendor-patches": "^11.5",
6161
"tomasvotruba/class-leak": "^2.1",
6262
"tomasvotruba/unused-public": "^2.1",

rules/Php72/Rector/FuncCall/GetClassOnNullRector.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function refactor(Node $node): ?Node
8282
}
8383

8484
// just created func call
85-
if ($node->getAttribute(AttributeKey::DO_NOT_CHANGE) === true) {
85+
if ($node->getAttribute(AttributeKey::ORIGINAL_NODE) === null) {
8686
return null;
8787
}
8888

@@ -124,9 +124,6 @@ public function refactor(Node $node): ?Node
124124

125125
private function createGetClassFuncCall(FuncCall $oldFuncCall): FuncCall
126126
{
127-
$funcCall = new FuncCall($oldFuncCall->name, $oldFuncCall->args);
128-
$funcCall->setAttribute(AttributeKey::DO_NOT_CHANGE, true);
129-
130-
return $funcCall;
127+
return new FuncCall($oldFuncCall->name, $oldFuncCall->args);
131128
}
132129
}

0 commit comments

Comments
 (0)