Skip to content

Commit c906698

Browse files
sivaschenkohostep
authored andcommitted
#31176: Updated AnalysisResult constructor arguments
(cherry picked from commit 841b172)
1 parent 8f2a4bf commit c906698

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"pdepend/pdepend": "~2.7.1",
9797
"phpcompatibility/php-compatibility": "^9.3",
9898
"phpmd/phpmd": "^2.8.0",
99-
"phpstan/phpstan": "^0.12.3",
99+
"phpstan/phpstan": "^0.12.77",
100100
"phpunit/phpunit": "^9",
101101
"sebastian/phpcpd": "~5.0.0",
102102
"squizlabs/php_codesniffer": "~3.5.4"

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@
4141
class FilteredErrorFormatter implements ErrorFormatter
4242
{
4343
private const MUTE_ERROR_ANNOTATION = 'phpstan:ignore';
44-
4544
private const NO_ERRORS = 0;
4645

46+
/**
47+
* @var TableErrorFormatter
48+
*/
4749
private $tableErrorFormatter;
4850

4951
/**
@@ -60,22 +62,18 @@ public function __construct(TableErrorFormatter $tableErrorFormatter)
6062
public function formatErrors(AnalysisResult $analysisResult, Output $output): int
6163
{
6264
if (!$analysisResult->hasErrors()) {
63-
$style = $output->getStyle();
64-
$style->success('No errors');
65+
$output->getStyle()->success('No errors');
6566
return self::NO_ERRORS;
6667
}
6768

68-
$fileSpecificErrorsWithoutIgnoredErrors = $this->clearIgnoredErrors(
69-
$analysisResult->getFileSpecificErrors()
70-
);
71-
7269
$clearedAnalysisResult = new AnalysisResult(
73-
$fileSpecificErrorsWithoutIgnoredErrors,
70+
$this->clearIgnoredErrors($analysisResult->getFileSpecificErrors()),
7471
$analysisResult->getNotFileSpecificErrors(),
72+
$analysisResult->getInternalErrors(),
7573
$analysisResult->getWarnings(),
7674
$analysisResult->isDefaultLevelUsed(),
77-
$analysisResult->hasInferrablePropertyTypesFromConstructor(),
78-
$analysisResult->getProjectConfigFile()
75+
$analysisResult->getProjectConfigFile(),
76+
$analysisResult->isResultCacheSaved()
7977
);
8078

8179
return $this->tableErrorFormatter->formatErrors($clearedAnalysisResult, $output);

0 commit comments

Comments
 (0)