Skip to content

Commit 42a8b19

Browse files
canvuralondrejmirtes
authored andcommitted
Get stubs from StubFilesProvider
1 parent b2d512d commit 42a8b19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Command/AnalyseApplication.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use PHPStan\Analyser\IgnoredErrorHelper;
77
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
88
use PHPStan\Internal\BytesHelper;
9+
use PHPStan\PhpDoc\StubFilesProvider;
910
use PHPStan\PhpDoc\StubValidator;
1011
use PHPStan\ShouldNotHappenException;
1112
use Symfony\Component\Console\Input\InputInterface;
@@ -25,6 +26,7 @@ public function __construct(
2526
private ResultCacheManagerFactory $resultCacheManagerFactory,
2627
private IgnoredErrorHelper $ignoredErrorHelper,
2728
private int $internalErrorsCountLimit,
29+
private StubFilesProvider $stubFilesProvider,
2830
)
2931
{
3032
}
@@ -67,10 +69,8 @@ public function analyse(
6769
$input,
6870
);
6971

70-
$projectStubFiles = [];
71-
if ($projectConfigArray !== null) {
72-
$projectStubFiles = $projectConfigArray['parameters']['stubFiles'] ?? [];
73-
}
72+
$projectStubFiles = $this->stubFilesProvider->getStubFiles();
73+
7474
if ($resultCache->isFullAnalysis() && count($projectStubFiles) !== 0) {
7575
$stubErrors = $this->stubValidator->validate($projectStubFiles, $debug);
7676
$intermediateAnalyserResult = new AnalyserResult(

0 commit comments

Comments
 (0)