Skip to content

Commit 27ccf57

Browse files
staabmondrejmirtes
authored andcommitted
Narrow errors-array type to list
1 parent 6e498e6 commit 27ccf57

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Analyser/Ignore/IgnoredErrorHelperResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getErrors(): array
4242
}
4343

4444
/**
45-
* @param Error[] $errors
45+
* @param list<Error> $errors
4646
* @param string[] $analysedFiles
4747
*/
4848
public function process(

src/Command/FixerWorkerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private function transformErrorIntoInternalError(Error $error): InternalError
355355

356356
/**
357357
* @param string[] $inceptionFiles
358-
* @param array<Error> $errors
358+
* @param list<Error> $errors
359359
* @return array{list<Error>, list<array{Error, mixed[]|string}>}
360360
*/
361361
private function filterErrors(array $errors, IgnoredErrorHelperResult $ignoredErrorHelperResult, bool $onlyFiles, array $inceptionFiles, bool $hasInternalErrors): array

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,7 @@ public function testBug13310(): void
15581558

15591559
/**
15601560
* @param string[]|null $allAnalysedFiles
1561-
* @return Error[]
1561+
* @return list<Error>
15621562
*/
15631563
private function runAnalyse(string $file, ?array $allAnalysedFiles = null): array
15641564
{

tests/PHPStan/Analyser/AnalyserWithCheckDynamicPropertiesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testBug13529(): void
1818
}
1919

2020
/**
21-
* @return Error[]
21+
* @return list<Error>
2222
*/
2323
private function runAnalyse(string $file): array
2424
{

0 commit comments

Comments
 (0)