Skip to content

Commit

Permalink
Removed unused fileName in FetchedNode
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and ondrejmirtes committed Dec 28, 2022
1 parent 1e7b58a commit 6f19a54
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
Expand Up @@ -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),
);
}
Expand All @@ -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),
);
}
Expand All @@ -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),
);
}
Expand All @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions src/Reflection/BetterReflection/SourceLocator/FetchedNode.php
Expand Up @@ -17,7 +17,6 @@ class FetchedNode
public function __construct(
private Node $node,
private ?Node\Stmt\Namespace_ $namespace,
private string $fileName,
private LocatedSource $locatedSource,
)
{
Expand All @@ -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;
Expand Down

0 comments on commit 6f19a54

Please sign in to comment.