From 27aaa0b88b70e2aa8a5b982d89bd1daa81f481ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Sun, 14 Nov 2021 14:54:10 +0100 Subject: [PATCH] Removed dead code --- .../SourceStubber/PhpStormStubsSourceStubber.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php b/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php index dd358982b..5e4c39600 100644 --- a/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php +++ b/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php @@ -221,7 +221,7 @@ public function generateClassStub(string $className): ?StubData } $extension = $this->getExtensionFromFilePath($filePath); - $stub = $this->createStub($this->classNodes[$lowercaseClassName], $extension); + $stub = $this->createStub($this->classNodes[$lowercaseClassName]); if ($className === Traversable::class) { // See https://github.com/JetBrains/phpstorm-stubs/commit/0778a26992c47d7dbee4d0b0bfb7fad4344371b1#diff-575bacb45377d474336c71cbf53c1729 @@ -259,7 +259,7 @@ public function generateFunctionStub(string $functionName): ?StubData $extension = $this->getExtensionFromFilePath($filePath); - return new StubData($this->createStub($this->functionNodes[$lowercaseFunctionName], $extension), $extension); + return new StubData($this->createStub($this->functionNodes[$lowercaseFunctionName]), $extension); } public function generateConstantStub(string $constantName): ?StubData @@ -295,7 +295,7 @@ public function generateConstantStub(string $constantName): ?StubData $extension = $this->getExtensionFromFilePath($filePath); - return new StubData($this->createStub($constantNode, $extension), $extension); + return new StubData($this->createStub($constantNode), $extension); } private function parseFile(string $filePath): void @@ -363,7 +363,7 @@ private function parseFile(string $filePath): void /** * @param Node\Stmt\ClassLike|Node\Stmt\Function_|Node\Stmt\Const_|Node\Expr\FuncCall $node */ - private function createStub(Node $node, string $extension): string + private function createStub(Node $node): string { if (! ($node instanceof Node\Expr\FuncCall)) { $this->addDeprecatedDocComment($node);