Skip to content

Commit e699752

Browse files
committed
Used FullyQualified for constant name
1 parent 978bfee commit e699752

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rules-tests/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector/Fixture/fixture.php.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ namespace Rector\Tests\Php84\Rector\FuncCall\RoundingModeEnumRector;
2323

2424
round(1.5, 0);
2525
round(1.5);
26-
round(1.5, 0, PHP_ROUND_HALF_UP);
27-
round(1.5, 0, PHP_ROUND_HALF_DOWN);
28-
round(1.5, 0, PHP_ROUND_HALF_EVEN);
29-
round(1.5, 0, PHP_ROUND_HALF_ODD);
26+
round(1.5, 0, \PHP_ROUND_HALF_UP);
27+
round(1.5, 0, \PHP_ROUND_HALF_DOWN);
28+
round(1.5, 0, \PHP_ROUND_HALF_EVEN);
29+
round(1.5, 0, \PHP_ROUND_HALF_ODD);
3030
round(1.5, 0, \RoundingMode::TowardsZero);
3131
round(1.5, 0, \RoundingMode::AwayFromZero);
3232
round(1.5, 0, \RoundingMode::NegativeInfinity);

rules/DowngradePhp84/Rector/FuncCall/DowngradeRoundingModeEnumRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function refactor(Node $node): ?Node
8080
return null;
8181
}
8282

83-
$args[2]->value = new Node\Expr\ConstFetch(new Node\Name($constantName));
83+
$args[2]->value = new Node\Expr\ConstFetch(new Node\Name\FullyQualified($constantName));
8484
$hasChanged = true;
8585
}
8686
}

0 commit comments

Comments
 (0)