@@ -267,6 +267,7 @@ |
||
267 | 267 | |
268 | 268 | /** |
269 | 269 | * @param non-empty-array<string> $mapping_function_ids |
270 | + * @param ArrayType|null $array_arg_type |
|
270 | 271 | */ |
271 | 272 | private static function getReturnTypeFromMappingIds( |
272 | 273 | \Psalm\Internal\Analyzer\StatementsAnalyzer $statements_source, |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use Psalm\CodeLocation; |
10 | 10 | use Psalm\Context; |
11 | 11 | use Psalm\Internal\Analyzer\Statements\Expression\CallAnalyzer; |
12 | -use Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer; |
|
13 | 12 | use Psalm\Internal\Codebase\InternalCallMapHandler; |
14 | 13 | use Psalm\Internal\Type\ArrayType; |
15 | 14 | use Psalm\StatementsSource; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | /** |
85 | 85 | * @param string $file_path |
86 | 86 | * |
87 | - * @return list<\PhpParser\Node\Stmt> |
|
87 | + * @return PhpParser\Node[] |
|
88 | 88 | */ |
89 | 89 | public function getStatementsForFile($file_path, Progress $progress = null) |
90 | 90 | { |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | |
185 | 185 | $unchanged_members = array_map( |
186 | 186 | /** |
187 | - * @param int $_ |
|
187 | + * @param string $_ |
|
188 | 188 | * |
189 | - * @return bool |
|
189 | + * @return PhpParser\Node[] |
|
190 | 190 | */ |
191 | 191 | function ($_) { |
192 | 192 | return true; |
@@ -196,9 +196,9 @@ discard block |
||
196 | 196 | |
197 | 197 | $unchanged_signature_members = array_map( |
198 | 198 | /** |
199 | - * @param int $_ |
|
199 | + * @param string $_ |
|
200 | 200 | * |
201 | - * @return bool |
|
201 | + * @return PhpParser\Node[] |
|
202 | 202 | */ |
203 | 203 | function ($_) { |
204 | 204 | return true; |
@@ -221,9 +221,9 @@ discard block |
||
221 | 221 | |
222 | 222 | $changed_members = array_map( |
223 | 223 | /** |
224 | - * @param int $_ |
|
224 | + * @param string $_ |
|
225 | 225 | * |
226 | - * @return bool |
|
226 | + * @return PhpParser\Node[] |
|
227 | 227 | */ |
228 | 228 | function ($_) { |
229 | 229 | return true; |
@@ -385,6 +385,7 @@ discard block |
||
385 | 385 | |
386 | 386 | /** |
387 | 387 | * @param TValue ...$values |
388 | + * @param TValue[] $values |
|
388 | 389 | */ |
389 | 390 | public function contains(...$values): bool; |
390 | 391 | |
@@ -414,6 +415,7 @@ discard block |
||
414 | 415 | |
415 | 416 | /** |
416 | 417 | * @param TValue ...$values |
418 | + * @param TValue[] $values |
|
417 | 419 | * @throws \OutOfRangeException |
418 | 420 | */ |
419 | 421 | public function insert(int $index, ...$values); |
@@ -452,6 +454,7 @@ discard block |
||
452 | 454 | |
453 | 455 | /** |
454 | 456 | * @param TValue ...$values |
457 | + * @param TValue[] $values |
|
455 | 458 | */ |
456 | 459 | public function push(...$values); |
457 | 460 | |
@@ -504,6 +507,7 @@ discard block |
||
504 | 507 | |
505 | 508 | /** |
506 | 509 | * @param TValue ...$values |
510 | + * @param TValue[] $values |
|
507 | 511 | */ |
508 | 512 | public function unshift(...$values); |
509 | 513 | } |
@@ -584,6 +588,7 @@ discard block |
||
584 | 588 | |
585 | 589 | /** |
586 | 590 | * @param TValue ...$values |
591 | + * @param TValue[] $values |
|
587 | 592 | */ |
588 | 593 | public function add(...$values): void |
589 | 594 | { |
@@ -591,6 +596,7 @@ discard block |
||
591 | 596 | |
592 | 597 | /** |
593 | 598 | * @param TValue ...$values |
599 | + * @param TValue[] $values |
|
594 | 600 | */ |
595 | 601 | public function contains(...$values): bool |
596 | 602 | { |
@@ -664,6 +670,7 @@ discard block |
||
664 | 670 | |
665 | 671 | /** |
666 | 672 | * @param TValue ...$values |
673 | + * @param TValue[] $values |
|
667 | 674 | */ |
668 | 675 | public function remove(...$values): void |
669 | 676 | { |
@@ -762,6 +769,7 @@ discard block |
||
762 | 769 | |
763 | 770 | /** |
764 | 771 | * @param TValue ...$values |
772 | + * @param TValue[] $values |
|
765 | 773 | */ |
766 | 774 | public function push(...$values): void |
767 | 775 | { |
@@ -813,6 +821,7 @@ discard block |
||
813 | 821 | |
814 | 822 | /** |
815 | 823 | * @param TValue ...$values |
824 | + * @param TValue[] $values |
|
816 | 825 | */ |
817 | 826 | public function push(...$values): void |
818 | 827 | { |
@@ -336,6 +336,7 @@ discard block |
||
336 | 336 | * @param string[] $suppressed_issues |
337 | 337 | * @param array<string, array<string, array{Type\Union}>> $template_type_map |
338 | 338 | * @param-out 0|1|2 $failed_reconciliation |
339 | + * @param null|CodeLocation $code_location |
|
339 | 340 | */ |
340 | 341 | private static function refine( |
341 | 342 | StatementsAnalyzer $statements_analyzer, |
@@ -848,6 +849,7 @@ discard block |
||
848 | 849 | |
849 | 850 | /** |
850 | 851 | * @param string[] $suppressed_issues |
852 | + * @param null|CodeLocation $code_location |
|
851 | 853 | */ |
852 | 854 | private static function handleLiteralEquality( |
853 | 855 | string $assertion, |
@@ -28,6 +28,7 @@ |
||
28 | 28 | * @param array<string, array<string, array{Type\Union}>> $template_type_map |
29 | 29 | * @param string[] $suppressed_issues |
30 | 30 | * @param 0|1|2 $failed_reconciliation |
31 | + * @param null|CodeLocation $code_location |
|
31 | 32 | * |
32 | 33 | * @return Type\Union |
33 | 34 | */ |
@@ -192,8 +192,6 @@ discard block |
||
192 | 192 | } |
193 | 193 | |
194 | 194 | /** |
195 | - * @param string[] $suppressed_issues |
|
196 | - * @param 0|1|2 $failed_reconciliation |
|
197 | 195 | */ |
198 | 196 | private static function reconcileCallable( |
199 | 197 | Type\Union $existing_var_type |
@@ -282,6 +280,7 @@ discard block |
||
282 | 280 | /** |
283 | 281 | * @param string[] $suppressed_issues |
284 | 282 | * @param 0|1|2 $failed_reconciliation |
283 | + * @param null|integer $min_count |
|
285 | 284 | */ |
286 | 285 | private static function reconcileNonEmptyCountable( |
287 | 286 | Type\Union $existing_var_type, |
@@ -20,6 +20,7 @@ |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @param array<string, mixed> $phantom_classes |
23 | + * @param null|FileStorage $file_storage |
|
23 | 24 | * |
24 | 25 | * @return void |
25 | 26 | */ |
@@ -22,7 +22,6 @@ |
||
22 | 22 | use Psalm\Report\GithubActionsReport; |
23 | 23 | use Psalm\Report\JsonReport; |
24 | 24 | use Psalm\Report\JsonSummaryReport; |
25 | -use Psalm\Report\JunitReport; |
|
26 | 25 | use Psalm\Report\PylintReport; |
27 | 26 | use Psalm\Report\SonarqubeReport; |
28 | 27 | use Psalm\Report\TextReport; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @param array<PhpParser\Node\Arg> $call_args |
19 | 19 | * |
20 | - * @return ?Type\Union |
|
20 | + * @return Type\Union|null |
|
21 | 21 | */ |
22 | 22 | public static function getFunctionReturnType( |
23 | 23 | StatementsSource $statements_source, |