@@ -63,7 +63,6 @@ discard block |
||
| 63 | 63 | * Determine whether or not a given class exists |
| 64 | 64 | * |
| 65 | 65 | * @param string $fq_class_name |
| 66 | - * @param FileChecker $file_checker |
|
| 67 | 66 | * |
| 68 | 67 | * @return bool |
| 69 | 68 | */ |
@@ -564,7 +563,7 @@ discard block |
||
| 564 | 563 | $constructor_storage = $constructor_class_storage->methods['__construct']; |
| 565 | 564 | |
| 566 | 565 | $fake_constructor_params = array_map( |
| 567 | - /** @return PhpParser\Node\Param */ |
|
| 566 | + /** @return null|false */ |
|
| 568 | 567 | function (\Psalm\FunctionLikeParameter $param) { |
| 569 | 568 | $fake_param = (new PhpParser\Builder\Param($param->name)); |
| 570 | 569 | if ($param->signature_type) { |
@@ -577,7 +576,7 @@ discard block |
||
| 577 | 576 | ); |
| 578 | 577 | |
| 579 | 578 | $fake_constructor_stmt_args = array_map( |
| 580 | - /** @return PhpParser\Node\Arg */ |
|
| 579 | + /** @return null|false */ |
|
| 581 | 580 | function (\Psalm\FunctionLikeParameter $param) { |
| 582 | 581 | return new PhpParser\Node\Arg(new PhpParser\Node\Expr\Variable($param->name)); |
| 583 | 582 | }, |
@@ -625,7 +625,7 @@ |
||
| 625 | 625 | * @param string|null $calling_context |
| 626 | 626 | * @param StatementsSource $source |
| 627 | 627 | * @param CodeLocation $code_location |
| 628 | - * @param array $suppressed_issues |
|
| 628 | + * @param string[] $suppressed_issues |
|
| 629 | 629 | * @param bool $emit_issues |
| 630 | 630 | * |
| 631 | 631 | * @return bool|null |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | * @param string $function_id |
| 147 | 147 | * @param array<PhpParser\Node\Arg> $call_args |
| 148 | 148 | * @param CodeLocation $code_location |
| 149 | - * @param array $suppressed_issues |
|
| 149 | + * @param string[] $suppressed_issues |
|
| 150 | 150 | * |
| 151 | 151 | * @return Type\Union |
| 152 | 152 | */ |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | /** |
| 221 | 221 | * @param string $method_id |
| 222 | 222 | * @param CodeLocation $code_location |
| 223 | - * @param array $suppressed_issues |
|
| 223 | + * @param string[] $suppressed_issues |
|
| 224 | 224 | * |
| 225 | 225 | * @return bool|null |
| 226 | 226 | */ |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | /** |
| 332 | 332 | * @param string $method_id |
| 333 | 333 | * @param CodeLocation $code_location |
| 334 | - * @param array $suppressed_issues |
|
| 334 | + * @param string[] $suppressed_issues |
|
| 335 | 335 | * |
| 336 | 336 | * @return false|null |
| 337 | 337 | */ |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | * @param string|null $calling_context |
| 445 | 445 | * @param StatementsSource $source |
| 446 | 446 | * @param CodeLocation $code_location |
| 447 | - * @param array $suppressed_issues |
|
| 447 | + * @param string[] $suppressed_issues |
|
| 448 | 448 | * |
| 449 | 449 | * @return false|null |
| 450 | 450 | */ |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $if_clauses = array_values( |
| 164 | 164 | array_filter( |
| 165 | 165 | $if_clauses, |
| 166 | - /** @return bool */ |
|
| 166 | + /** @return false|null */ |
|
| 167 | 167 | function (Clause $c) use ($mixed_var_ids) { |
| 168 | 168 | $keys = array_keys($c->possibilities); |
| 169 | 169 | |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | if ($changed_var_ids) { |
| 679 | 679 | $entry_clauses = array_filter( |
| 680 | 680 | $entry_clauses, |
| 681 | - /** @return bool */ |
|
| 681 | + /** @return false|null */ |
|
| 682 | 682 | function (Clause $c) use ($changed_var_ids) { |
| 683 | 683 | return count($c->possibilities) > 1 |
| 684 | 684 | || !in_array(array_keys($c->possibilities)[0], $changed_var_ids, true); |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | $elseif_clauses = array_values( |
| 731 | 731 | array_filter( |
| 732 | 732 | $elseif_clauses, |
| 733 | - /** @return bool */ |
|
| 733 | + /** @return false|null */ |
|
| 734 | 734 | function (Clause $c) use ($mixed_var_ids) { |
| 735 | 735 | $keys = array_keys($c->possibilities); |
| 736 | 736 | |
@@ -19,11 +19,9 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Checks an array of statements in a loop |
| 21 | 21 | * |
| 22 | - * @param array<PhpParser\Node\Stmt|PhpParser\Node\Expr> $stmts |
|
| 22 | + * @param PhpParser\Node[] $stmts |
|
| 23 | 23 | * @param PhpParser\Node\Expr[] $pre_conditions |
| 24 | 24 | * @param PhpParser\Node\Expr[] $post_conditions |
| 25 | - * @param Context $loop_scope->loop_context |
|
| 26 | - * @param Context $loop_scope->loop_parent_context |
|
| 27 | 25 | * |
| 28 | 26 | * @return false|null |
| 29 | 27 | */ |
@@ -147,9 +147,9 @@ |
||
| 147 | 147 | $catch_context->vars_in_scope[$catch_var_id] = new Type\Union( |
| 148 | 148 | array_map( |
| 149 | 149 | /** |
| 150 | - * @param string $fq_catch_class |
|
| 150 | + * @param StatementsChecker $fq_catch_class |
|
| 151 | 151 | * |
| 152 | - * @return Type\Atomic |
|
| 152 | + * @return false|null |
|
| 153 | 153 | */ |
| 154 | 154 | function ($fq_catch_class) use ($project_checker) { |
| 155 | 155 | $catch_class_type = new TNamedObject($fq_catch_class); |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | * @param PhpParser\Node\Expr\MethodCall $stmt |
| 686 | 686 | * @param Context $context |
| 687 | 687 | * |
| 688 | - * @return false|null |
|
| 688 | + * @return null|boolean |
|
| 689 | 689 | */ |
| 690 | 690 | public static function analyzeMethodCall( |
| 691 | 691 | StatementsChecker $statements_checker, |
@@ -1293,7 +1293,7 @@ discard block |
||
| 1293 | 1293 | * @param PhpParser\Node\Expr\StaticCall $stmt |
| 1294 | 1294 | * @param Context $context |
| 1295 | 1295 | * |
| 1296 | - * @return false|null |
|
| 1296 | + * @return null|boolean |
|
| 1297 | 1297 | */ |
| 1298 | 1298 | public static function analyzeStaticCall( |
| 1299 | 1299 | StatementsChecker $statements_checker, |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | /** |
| 139 | 139 | * @param Type\Union $array_type |
| 140 | 140 | * @param Type\Union $offset_type |
| 141 | - * @param ?string $array_var_id |
|
| 141 | + * @param string|null $array_var_id |
|
| 142 | 142 | * @param bool $in_assignment |
| 143 | 143 | * @param bool $inside_isset |
| 144 | 144 | * |