@@ -693,6 +693,7 @@ |
||
693 | 693 | * @param FunctionLikeParameter|null $last_param |
694 | 694 | * @param array<int, FunctionLikeParameter> $function_params |
695 | 695 | * @param FunctionLikeStorage|null $function_storage |
696 | + * @param FunctionLikeParameter[] $function_params |
|
696 | 697 | * @return false|null |
697 | 698 | */ |
698 | 699 | private static function handlePossiblyMatchingByRefParam( |
@@ -879,6 +879,7 @@ discard block |
||
879 | 879 | |
880 | 880 | /** |
881 | 881 | * @param non-empty-string $function_id |
882 | + * @param FunctionLikeStorage|null $function_storage |
|
882 | 883 | */ |
883 | 884 | private static function getFunctionCallReturnType( |
884 | 885 | StatementsAnalyzer $statements_analyzer, |
@@ -1041,6 +1042,9 @@ discard block |
||
1041 | 1042 | return $stmt_type; |
1042 | 1043 | } |
1043 | 1044 | |
1045 | + /** |
|
1046 | + * @param FunctionLikeStorage|null $function_storage |
|
1047 | + */ |
|
1044 | 1048 | private static function checkFunctionCallPurity( |
1045 | 1049 | StatementsAnalyzer $statements_analyzer, |
1046 | 1050 | \Psalm\Codebase $codebase, |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param Codebase $codebase |
49 | 49 | * @param Context $context |
50 | 50 | * @param Type\Atomic\TNamedObject|Type\Atomic\TTemplateParam $static_type |
51 | - * @param ?string $lhs_var_id |
|
51 | + * @param string|null $lhs_var_id |
|
52 | 52 | */ |
53 | 53 | public static function analyze( |
54 | 54 | StatementsAnalyzer $statements_analyzer, |
@@ -831,6 +831,9 @@ discard block |
||
831 | 831 | ); |
832 | 832 | } |
833 | 833 | |
834 | + /** |
|
835 | + * @param Type\Union|null $all_intersection_return_type |
|
836 | + */ |
|
834 | 837 | private static function updateResultReturnType( |
835 | 838 | AtomicMethodCallAnalysisResult $result, |
836 | 839 | ?Type\Union $return_type_candidate, |
@@ -10,7 +10,6 @@ |
||
10 | 10 | use Psalm\Internal\Analyzer\Statements\Expression\Call\ArgumentMapPopulator; |
11 | 11 | use Psalm\Internal\Analyzer\Statements\Expression\Call\ClassTemplateParamCollector; |
12 | 12 | use Psalm\Internal\Analyzer\Statements\Expression\Call\ArgumentsAnalyzer; |
13 | -use Psalm\Internal\Analyzer\Statements\Expression\Fetch\PropertyFetchAnalyzer; |
|
14 | 13 | use Psalm\Internal\Analyzer\Statements\Expression\ExpressionIdentifier; |
15 | 14 | use Psalm\Internal\Analyzer\StatementsAnalyzer; |
16 | 15 | use Psalm\Internal\Analyzer\TypeAnalyzer; |
@@ -500,7 +500,7 @@ |
||
500 | 500 | |
501 | 501 | $array_values = array_map( |
502 | 502 | /** |
503 | - * @return PhpParser\Node\Expr\ArrayItem |
|
503 | + * @return boolean |
|
504 | 504 | */ |
505 | 505 | function (PhpParser\Node\Arg $arg) { |
506 | 506 | return new PhpParser\Node\Expr\ArrayItem($arg->value); |
@@ -224,6 +224,7 @@ |
||
224 | 224 | * @param Context $context |
225 | 225 | * @param CodeLocation $code_location |
226 | 226 | * @param StatementsAnalyzer $statements_analyzer |
227 | + * @param TemplateResult|null $class_template_result |
|
227 | 228 | */ |
228 | 229 | protected static function checkMethodArgs( |
229 | 230 | ?\Psalm\Internal\MethodIdentifier $method_id, |
@@ -18,6 +18,7 @@ |
||
18 | 18 | * @param string|null $this_class_name |
19 | 19 | * @param FileSource|null $source |
20 | 20 | * @param int|null &$nesting |
21 | + * @param integer $nesting |
|
21 | 22 | * |
22 | 23 | * @return string|null |
23 | 24 | */ |
@@ -1432,6 +1432,9 @@ discard block |
||
1432 | 1432 | return $array_access_type; |
1433 | 1433 | } |
1434 | 1434 | |
1435 | + /** |
|
1436 | + * @param null|string $array_var_id |
|
1437 | + */ |
|
1435 | 1438 | private static function checkLiteralIntArrayOffset( |
1436 | 1439 | Type\Union $offset_type, |
1437 | 1440 | Type\Union $expected_offset_type, |
@@ -1481,6 +1484,9 @@ discard block |
||
1481 | 1484 | } |
1482 | 1485 | } |
1483 | 1486 | |
1487 | + /** |
|
1488 | + * @param null|string $array_var_id |
|
1489 | + */ |
|
1484 | 1490 | private static function checkLiteralStringArrayOffset( |
1485 | 1491 | Type\Union $offset_type, |
1486 | 1492 | Type\Union $expected_offset_type, |
@@ -57,7 +57,6 @@ |
||
57 | 57 | use function in_array; |
58 | 58 | use function is_int; |
59 | 59 | use function preg_match; |
60 | -use Psalm\Internal\Taint\TaintNode; |
|
61 | 60 | use Psalm\Internal\Taint\Source; |
62 | 61 | use Psalm\Internal\Type\TemplateResult; |
63 | 62 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | class IncDecExpressionAnalyzer |
16 | 16 | { |
17 | 17 | /** |
18 | - * @param PostInc|PostDec|PreInc|PreDec $stmt |
|
18 | + * @param PhpParser\Node\Expr $stmt |
|
19 | 19 | */ |
20 | 20 | public static function analyze( |
21 | 21 | StatementsAnalyzer $statements_analyzer, |
@@ -99,6 +99,9 @@ |
||
99 | 99 | return true; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param null|Context $global_context |
|
104 | + */ |
|
102 | 105 | private static function handleExpression( |
103 | 106 | StatementsAnalyzer $statements_analyzer, |
104 | 107 | PhpParser\Node\Expr $stmt, |