Skip to content

Commit dfbdd70

Browse files
committed
php 8.2 compat
1 parent 594a52b commit dfbdd70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ public function getNodeTypes(): array
5151
*/
5252
public function refactor(Node $node): ?Ternary
5353
{
54-
static $currentFile = $this->file;
54+
static $currentFile = null;
5555

56-
if ($currentFile !== $this->file) {
56+
if ($currentFile !== $this->file->getFilePath()) {
5757
$this->counter = 0;
58-
$currentFile = $this->file;
58+
$currentFile = $this->file->getFilePath();
5959
}
6060

6161
if ($node instanceof MethodCall || $node instanceof PropertyFetch) {

0 commit comments

Comments
 (0)