diff --git a/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php b/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php index 6d12e5d09e..5f205e1682 100644 --- a/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php +++ b/src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php @@ -45,7 +45,6 @@ public function enterNode(Node $node): ?int $this->classNodes[strtolower($fullClassName)][] = new FetchedNode( $node, $this->currentNamespaceNode, - $this->fileName, new LocatedSource($this->contents, $fullClassName, $this->fileName), ); } @@ -59,7 +58,6 @@ public function enterNode(Node $node): ?int $this->functionNodes[strtolower($functionName)][] = new FetchedNode( $node, $this->currentNamespaceNode, - $this->fileName, new LocatedSource($this->contents, $functionName, $this->fileName), ); } @@ -76,7 +74,6 @@ public function enterNode(Node $node): ?int $this->constantNodes[ConstantNameHelper::normalize($const->namespacedName->toString())][] = new FetchedNode( $node, $this->currentNamespaceNode, - $this->fileName, new LocatedSource($this->contents, null, $this->fileName), ); } @@ -98,7 +95,6 @@ public function enterNode(Node $node): ?int $constantNode = new FetchedNode( $node, $this->currentNamespaceNode, - $this->fileName, new LocatedSource($this->contents, $constantName, $this->fileName), ); $this->constantNodes[ConstantNameHelper::normalize($constantName)][] = $constantNode; diff --git a/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php b/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php index 5af9211c14..89e33adb3d 100644 --- a/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php +++ b/src/Reflection/BetterReflection/SourceLocator/FetchedNode.php @@ -17,7 +17,6 @@ class FetchedNode public function __construct( private Node $node, private ?Node\Stmt\Namespace_ $namespace, - private string $fileName, private LocatedSource $locatedSource, ) { @@ -36,11 +35,6 @@ public function getNamespace(): ?Node\Stmt\Namespace_ return $this->namespace; } - public function getFileName(): string - { - return $this->fileName; - } - public function getLocatedSource(): LocatedSource { return $this->locatedSource;