Skip to content

Commit

Permalink
Drop inline @var
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and ondrejmirtes committed Mar 7, 2023
1 parent 0dbe3ab commit e5e48ea
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/Command/AnalyseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return $inceptionResult->handleReturn(0, null);
}

/** @var AnalyseApplication $application */
$application = $container->getByType(AnalyseApplication::class);

$debug = $input->getOption('debug');
Expand Down Expand Up @@ -436,7 +435,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$inceptionResult->handleReturn(0, $analysisResult->getPeakMemoryUsageBytes());

/** @var FixerApplication $fixerApplication */
$fixerApplication = $container->getByType(FixerApplication::class);

return $fixerApplication->run(
Expand Down
1 change: 0 additions & 1 deletion src/Command/ClearResultCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$container = $inceptionResult->getContainer();

/** @var ResultCacheClearer $resultCacheClearer */
$resultCacheClearer = $container->getByType(ResultCacheClearer::class);
$path = $resultCacheClearer->clear();

Expand Down
1 change: 0 additions & 1 deletion src/Command/CommandHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ public static function begin(

$pathRoutingParser = $container->getService('pathRoutingParser');

/** @var StubFilesProvider $stubFilesProvider */
$stubFilesProvider = $container->getByType(StubFilesProvider::class);

$filesCallback = static function () use ($currentWorkingDirectoryFileHelper, $stubFilesProvider, $fileFinder, $pathRoutingParser, $paths): array {
Expand Down
4 changes: 0 additions & 4 deletions src/Command/FixerWorkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Nette\Utils\Json;
use PHPStan\Analyser\IgnoredErrorHelper;
use PHPStan\Analyser\ResultCache\ResultCacheManager;
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
use PHPStan\ShouldNotHappenException;
use Symfony\Component\Console\Command\Command;
Expand Down Expand Up @@ -94,17 +93,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$container = $inceptionResult->getContainer();

/** @var IgnoredErrorHelper $ignoredErrorHelper */
$ignoredErrorHelper = $container->getByType(IgnoredErrorHelper::class);
$ignoredErrorHelperResult = $ignoredErrorHelper->initialize();
if (count($ignoredErrorHelperResult->getErrors()) > 0) {
throw new ShouldNotHappenException();
}

/** @var AnalyserRunner $analyserRunner */
$analyserRunner = $container->getByType(AnalyserRunner::class);

/** @var ResultCacheManager $resultCacheManager */
$resultCacheManager = $container->getByType(ResultCacheManagerFactory::class)->create();
$projectConfigArray = $inceptionResult->getProjectConfigArray();
[$inceptionFiles, $isOnlyFiles] = $inceptionResult->getFiles();
Expand Down
4 changes: 0 additions & 4 deletions src/Command/WorkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

/** @var NodeScopeResolver $nodeScopeResolver */
$nodeScopeResolver = $container->getByType(NodeScopeResolver::class);
$nodeScopeResolver->setAnalysedFiles($analysedFiles);

Expand Down Expand Up @@ -169,11 +168,8 @@ private function runWorker(
$out->end();
};
$out->on('error', $handleError);
/** @var FileAnalyser $fileAnalyser */
$fileAnalyser = $container->getByType(FileAnalyser::class);
/** @var RuleRegistry $ruleRegistry */
$ruleRegistry = $container->getByType(RuleRegistry::class);
/** @var CollectorRegistry $collectorRegistry */
$collectorRegistry = $container->getByType(CollectorRegistry::class);
$in->on('data', function (array $json) use ($fileAnalyser, $ruleRegistry, $collectorRegistry, $out, $analysedFiles, $output): void {
$action = $json['action'];
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/ContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ public static function postInitializeContainer(Container $container): void
$container->getByType(PhpStormStubsSourceStubber::class),
);

/** @var Broker $broker */
$broker = $container->getByType(Broker::class);
Broker::registerInstance($broker);
ReflectionProviderStaticAccessor::registerInstance($container->getByType(ReflectionProvider::class));
Expand Down
2 changes: 0 additions & 2 deletions src/PhpDoc/StubValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ public function validate(array $stubFiles, bool $debug): array
$ruleRegistry = $this->getRuleRegistry($container);
$collectorRegistry = $this->getCollectorRegistry($container);

/** @var FileAnalyser $fileAnalyser */
$fileAnalyser = $container->getByType(FileAnalyser::class);

/** @var NodeScopeResolver $nodeScopeResolver */
$nodeScopeResolver = $container->getByType(NodeScopeResolver::class);
$nodeScopeResolver->setAnalysedFiles($stubFiles);

Expand Down

0 comments on commit e5e48ea

Please sign in to comment.