Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Dependency/DependencyResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use PHPStan\Broker\ClassNotFoundException;
use PHPStan\Broker\FunctionNotFoundException;
use PHPStan\DependencyInjection\AutowiredService;
use PHPStan\File\FileHelper;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Node\FunctionCallableNode;
use PHPStan\Node\InClassMethodNode;
Expand All @@ -38,7 +37,6 @@ final class DependencyResolver
{

public function __construct(
private FileHelper $fileHelper,
private ReflectionProvider $reflectionProvider,
private ExportedNodeResolver $exportedNodeResolver,
private FileTypeMapper $fileTypeMapper,
Expand Down Expand Up @@ -492,7 +490,7 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
}
}

return new NodeDependencies($this->fileHelper, $dependenciesReflections, $this->exportedNodeResolver->resolve($scope->getFile(), $node));
return new NodeDependencies($dependenciesReflections, $this->exportedNodeResolver->resolve($scope->getFile(), $node));
}

public function resolveUsedTraitDependencies(InClassNode $inClassNode): NodeDependencies
Expand All @@ -502,7 +500,7 @@ public function resolveUsedTraitDependencies(InClassNode $inClassNode): NodeDepe
$dependenciesReflections[] = $trait;
}

return new NodeDependencies($this->fileHelper, $dependenciesReflections, null);
return new NodeDependencies($dependenciesReflections, null);
}

private function considerArrayForCallableTest(Scope $scope, Array_ $arrayNode): bool
Expand Down
3 changes: 0 additions & 3 deletions src/Dependency/NodeDependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace PHPStan\Dependency;

use PHPStan\File\FileHelper;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use function array_values;
Expand All @@ -14,7 +13,6 @@ final class NodeDependencies
* @param array<int, ClassReflection|FunctionReflection> $reflections
*/
public function __construct(
private FileHelper $fileHelper,
private array $reflections,
private ?RootExportedNode $exportedNode,
)
Expand Down Expand Up @@ -42,7 +40,6 @@ public function getFileDependencies(string $currentFile, array $analysedFiles):
if ($dependencyFile === null) {
continue;
}
$dependencyFile = $this->fileHelper->normalizePath($dependencyFile);

if ($currentFile === $dependencyFile) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/AnalyserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ private function createAnalyser(): Analyser
$container,
new IgnoreLexer(),
),
new DependencyResolver($fileHelper, $reflectionProvider, new ExportedNodeResolver($reflectionProvider, $fileTypeMapper, new ExprPrinter(new Printer())), $fileTypeMapper),
new DependencyResolver($reflectionProvider, new ExportedNodeResolver($reflectionProvider, $fileTypeMapper, new ExprPrinter(new Printer())), $fileTypeMapper),
new IgnoreErrorExtensionProvider(new NetteContainer(new Container([]))),
$container->getByType(RuleErrorTransformer::class),
new LocalIgnoresProcessor(),
Expand Down
Loading