Skip to content

Commit 6f19a54

Browse files
staabmondrejmirtes
authored andcommitted
Removed unused fileName in FetchedNode
1 parent 1e7b58a commit 6f19a54

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public function enterNode(Node $node): ?int
4545
$this->classNodes[strtolower($fullClassName)][] = new FetchedNode(
4646
$node,
4747
$this->currentNamespaceNode,
48-
$this->fileName,
4948
new LocatedSource($this->contents, $fullClassName, $this->fileName),
5049
);
5150
}
@@ -59,7 +58,6 @@ public function enterNode(Node $node): ?int
5958
$this->functionNodes[strtolower($functionName)][] = new FetchedNode(
6059
$node,
6160
$this->currentNamespaceNode,
62-
$this->fileName,
6361
new LocatedSource($this->contents, $functionName, $this->fileName),
6462
);
6563
}
@@ -76,7 +74,6 @@ public function enterNode(Node $node): ?int
7674
$this->constantNodes[ConstantNameHelper::normalize($const->namespacedName->toString())][] = new FetchedNode(
7775
$node,
7876
$this->currentNamespaceNode,
79-
$this->fileName,
8077
new LocatedSource($this->contents, null, $this->fileName),
8178
);
8279
}
@@ -98,7 +95,6 @@ public function enterNode(Node $node): ?int
9895
$constantNode = new FetchedNode(
9996
$node,
10097
$this->currentNamespaceNode,
101-
$this->fileName,
10298
new LocatedSource($this->contents, $constantName, $this->fileName),
10399
);
104100
$this->constantNodes[ConstantNameHelper::normalize($constantName)][] = $constantNode;

src/Reflection/BetterReflection/SourceLocator/FetchedNode.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class FetchedNode
1717
public function __construct(
1818
private Node $node,
1919
private ?Node\Stmt\Namespace_ $namespace,
20-
private string $fileName,
2120
private LocatedSource $locatedSource,
2221
)
2322
{
@@ -36,11 +35,6 @@ public function getNamespace(): ?Node\Stmt\Namespace_
3635
return $this->namespace;
3736
}
3837

39-
public function getFileName(): string
40-
{
41-
return $this->fileName;
42-
}
43-
4438
public function getLocatedSource(): LocatedSource
4539
{
4640
return $this->locatedSource;

0 commit comments

Comments
 (0)