@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | /** |
| 881 | 881 | * Whether or not a given method exists |
| 882 | 882 | * |
| 883 | - * @param string|\Psalm\Internal\MethodIdentifier $method_id |
|
| 883 | + * @param string $method_id |
|
| 884 | 884 | * @param string|\Psalm\Internal\MethodIdentifier|null $calling_method_id |
| 885 | 885 | * |
| 886 | 886 | @return bool |
@@ -988,7 +988,7 @@ discard block |
||
| 988 | 988 | /** |
| 989 | 989 | * @param string|\Psalm\Internal\MethodIdentifier $method_id |
| 990 | 990 | * |
| 991 | - * @return array<string> |
|
| 991 | + * @return Internal\MethodIdentifier[] |
|
| 992 | 992 | */ |
| 993 | 993 | public function getOverriddenMethodIds($method_id) |
| 994 | 994 | { |
@@ -11,7 +11,6 @@ |
||
| 11 | 11 | use function preg_replace; |
| 12 | 12 | use Psalm\Internal\Analyzer\StatementsAnalyzer; |
| 13 | 13 | use Psalm\Internal\Clause; |
| 14 | -use Psalm\Internal\MethodIdentifier; |
|
| 15 | 14 | use Psalm\Storage\FunctionLikeStorage; |
| 16 | 15 | use Psalm\Internal\Type\AssertionReconciler; |
| 17 | 16 | use Psalm\Type\Union; |
@@ -958,6 +958,9 @@ |
||
| 958 | 958 | } |
| 959 | 959 | } |
| 960 | 960 | |
| 961 | + /** |
|
| 962 | + * @param string|null $parent_fq_class_name |
|
| 963 | + */ |
|
| 961 | 964 | public static function addContextProperties( |
| 962 | 965 | StatementsSource $statements_source, |
| 963 | 966 | ClassLikeStorage $storage, |
@@ -211,6 +211,7 @@ discard block |
||
| 211 | 211 | * @param string $fq_class_name |
| 212 | 212 | * @param array<string> $suppressed_issues |
| 213 | 213 | * @param bool $inferred - whether or not the type was inferred |
| 214 | + * @param null|string $calling_fq_class_name |
|
| 214 | 215 | * |
| 215 | 216 | * @return bool|null |
| 216 | 217 | */ |
@@ -538,7 +539,6 @@ discard block |
||
| 538 | 539 | |
| 539 | 540 | /** |
| 540 | 541 | * @param string $property_id |
| 541 | - * @param string|null $calling_context |
|
| 542 | 542 | * @param SourceAnalyzer $source |
| 543 | 543 | * @param CodeLocation $code_location |
| 544 | 544 | * @param string[] $suppressed_issues |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | /** |
| 142 | 142 | * @param CodeLocation $code_location |
| 143 | 143 | * @param string[] $suppressed_issues |
| 144 | - * @param lowercase-string|null $calling_method_id |
|
| 144 | + * @param string $calling_method_id |
|
| 145 | 145 | * |
| 146 | 146 | * @return bool|null |
| 147 | 147 | */ |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | use Psalm\IssueBuffer; |
| 13 | 13 | use Psalm\StatementsSource; |
| 14 | 14 | use Psalm\Storage\MethodStorage; |
| 15 | -use Psalm\Type; |
|
| 16 | 15 | use function strtolower; |
| 17 | 16 | use function in_array; |
| 18 | 17 | |
@@ -232,7 +232,6 @@ discard block |
||
| 232 | 232 | /** |
| 233 | 233 | * @param array<ReportOptions> $generated_report_options |
| 234 | 234 | * @param int $threads |
| 235 | - * @param string $reports |
|
| 236 | 235 | */ |
| 237 | 236 | public function __construct( |
| 238 | 237 | Config $config, |
@@ -1018,7 +1017,6 @@ discard block |
||
| 1018 | 1017 | } |
| 1019 | 1018 | |
| 1020 | 1019 | /** |
| 1021 | - * @param string $dir_name |
|
| 1022 | 1020 | * |
| 1023 | 1021 | * @return void |
| 1024 | 1022 | */ |
@@ -1224,8 +1222,6 @@ discard block |
||
| 1224 | 1222 | } |
| 1225 | 1223 | |
| 1226 | 1224 | /** |
| 1227 | - * @param int $php_major_version |
|
| 1228 | - * @param int $php_minor_version |
|
| 1229 | 1225 | * @param bool $dry_run |
| 1230 | 1226 | * @param bool $safe_types |
| 1231 | 1227 | * |
@@ -73,6 +73,7 @@ |
||
| 73 | 73 | * @param array<PhpParser\Node> $stmts |
| 74 | 74 | * @param bool $return_is_exit Exit and Throw statements are treated differently from return if this is false |
| 75 | 75 | * @param list<'loop'|'switch'> $break_types |
| 76 | + * @param \Psalm\Internal\Provider\NodeDataProvider|null $nodes |
|
| 76 | 77 | * |
| 77 | 78 | * @return list<value-of<self::ACTIONS>> |
| 78 | 79 | */ |
@@ -1004,6 +1004,9 @@ |
||
| 1004 | 1004 | } |
| 1005 | 1005 | } |
| 1006 | 1006 | |
| 1007 | + /** |
|
| 1008 | + * @return Type\Union |
|
| 1009 | + */ |
|
| 1007 | 1010 | private static function getFakeMethodCallType( |
| 1008 | 1011 | StatementsAnalyzer $statements_analyzer, |
| 1009 | 1012 | PhpParser\Node\Expr $foreach_expr, |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Psalm\Codebase; |
| 6 | 6 | use Psalm\Internal\Analyzer\ClassLikeAnalyzer; |
| 7 | 7 | use Psalm\Internal\Analyzer\CommentAnalyzer; |
| 8 | -use Psalm\Internal\Analyzer\ScopeAnalyzer; |
|
| 9 | 8 | use Psalm\Internal\Analyzer\Statements\Expression\AssignmentAnalyzer; |
| 10 | 9 | use Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer; |
| 11 | 10 | use Psalm\Internal\Analyzer\Statements\Expression\ExpressionIdentifier; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $if_clauses = array_values( |
| 123 | 123 | array_map( |
| 124 | 124 | /** |
| 125 | - * @return Clause |
|
| 125 | + * @return false|null |
|
| 126 | 126 | */ |
| 127 | 127 | function (Clause $c) use ($mixed_var_ids) { |
| 128 | 128 | $keys = array_keys($c->possibilities); |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | $omit_keys = array_reduce( |
| 218 | 218 | $context->clauses, |
| 219 | 219 | /** |
| 220 | - * @param array<string> $carry |
|
| 221 | - * @return array<string> |
|
| 220 | + * @param StatementsAnalyzer $carry |
|
| 221 | + * @return false|null |
|
| 222 | 222 | */ |
| 223 | 223 | function ($carry, Clause $clause) { |
| 224 | 224 | return array_merge($carry, array_keys($clause->possibilities)); |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | $entry_clauses = array_values( |
| 554 | 554 | array_filter( |
| 555 | 555 | $entry_clauses, |
| 556 | - /** @return bool */ |
|
| 556 | + /** @return \Psalm\Internal\Scope\IfConditionalScope */ |
|
| 557 | 557 | function (Clause $c) use ($changed_var_ids) { |
| 558 | 558 | return count($c->possibilities) > 1 |
| 559 | 559 | || $c->wedge |
@@ -683,9 +683,9 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | $newish_var_ids = array_map( |
| 685 | 685 | /** |
| 686 | - * @param Type\Union $_ |
|
| 686 | + * @param StatementsAnalyzer $_ |
|
| 687 | 687 | * |
| 688 | - * @return true |
|
| 688 | + * @return \Psalm\Internal\Scope\IfConditionalScope |
|
| 689 | 689 | */ |
| 690 | 690 | function (Type\Union $_) { |
| 691 | 691 | return true; |
@@ -1044,7 +1044,7 @@ discard block |
||
| 1044 | 1044 | * @param StatementsAnalyzer $statements_analyzer |
| 1045 | 1045 | * @param PhpParser\Node\Stmt\ElseIf_ $elseif |
| 1046 | 1046 | * @param IfScope $if_scope |
| 1047 | - * @param Context $elseif_context |
|
| 1047 | + * @param Context $else_context |
|
| 1048 | 1048 | * @param Context $outer_context |
| 1049 | 1049 | * |
| 1050 | 1050 | * @return false|null |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | |
| 1097 | 1097 | $elseif_clauses = array_map( |
| 1098 | 1098 | /** |
| 1099 | - * @return Clause |
|
| 1099 | + * @return false|null |
|
| 1100 | 1100 | */ |
| 1101 | 1101 | function (Clause $c) use ($mixed_var_ids) { |
| 1102 | 1102 | $keys = array_keys($c->possibilities); |
@@ -1118,7 +1118,7 @@ discard block |
||
| 1118 | 1118 | |
| 1119 | 1119 | $entry_clauses = array_map( |
| 1120 | 1120 | /** |
| 1121 | - * @return Clause |
|
| 1121 | + * @return false|null |
|
| 1122 | 1122 | */ |
| 1123 | 1123 | function (Clause $c) use ($cond_assigned_var_ids) { |
| 1124 | 1124 | $keys = array_keys($c->possibilities); |