Skip to content

Commit

Permalink
Do not call BuilderHelpers::normalizeValue(), it's not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 22, 2022
1 parent 8226c4f commit ec28678
Showing 1 changed file with 0 additions and 8 deletions.
Expand Up @@ -2,7 +2,6 @@

namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\NodeTraverser;
Expand All @@ -11,8 +10,6 @@
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
use PHPStan\BetterReflection\Util\ConstantNodeChecker;
use PHPStan\Reflection\ConstantNameHelper;
use function constant;
use function defined;
use function strtolower;

class CachingVisitor extends NodeVisitorAbstract
Expand Down Expand Up @@ -98,11 +95,6 @@ public function enterNode(Node $node): ?int
$nameNode = $node->getArgs()[0]->value;
$constantName = $nameNode->value;

if (defined($constantName)) {
$constantValue = @constant($constantName);
$node->getArgs()[1]->value = BuilderHelpers::normalizeValue($constantValue);
}

$constantNode = new FetchedNode(
$node,
$this->currentNamespaceNode,
Expand Down

0 comments on commit ec28678

Please sign in to comment.