Test Setup Failed
Pull Request — master (#3559)
by Jáchym
05:17
created
src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php 1 patch
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
      * @param  PhpParser\Node\Expr[]        $pre_conditions
33 33
      * @param  PhpParser\Node\Expr[]        $post_expressions
34 34
      * @param  Context                      loop_scope->loop_context
35
-     * @param  Context                      $loop_scope->loop_parent_context
36 35
      * @param  bool                         $is_do
37 36
      *
38 37
      * @return false|null
Please login to merge, or discard this patch.
src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 class SwitchCaseAnalyzer
32 32
 {
33 33
     /**
34
-     * @param ?string $switch_var_id
34
+     * @param string|null $switch_var_id
35 35
      * @return null|false
36 36
      */
37 37
     public static function analyze(
Please login to merge, or discard this patch.
src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2107,7 +2107,7 @@
 block discarded – undo
2107 2107
     }
2108 2108
 
2109 2109
     /**
2110
-     * @param  PhpParser\Node\Expr\FuncCall|PhpParser\Node\Expr\MethodCall|PhpParser\Node\Expr\StaticCall $expr
2110
+     * @param  PhpParser\Node\Expr\FuncCall $expr
2111 2111
      * @param  string|null  $this_class_name
2112 2112
      * @param  FileSource   $source
2113 2113
      * @param  bool         $negate
Please login to merge, or discard this patch.
Analyzer/Statements/Expression/Assignment/ArrayAssignmentAnalyzer.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -69,6 +69,7 @@
 block discarded – undo
69 69
 
70 70
     /**
71 71
      *
72
+     * @param PhpParser\Node\Expr|null $assign_value
72 73
      * @return false|null
73 74
      */
74 75
     public static function updateArrayType(
Please login to merge, or discard this patch.
Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $if_clauses = array_values(
60 60
             array_map(
61 61
                 /**
62
-                 * @return \Psalm\Internal\Clause
62
+                 * @return boolean
63 63
                  */
64 64
                 function (\Psalm\Internal\Clause $c) use ($mixed_var_ids) {
65 65
                     $keys = array_keys($c->possibilities);
Please login to merge, or discard this patch.
Analyzer/Statements/Expression/BinaryOp/NonDivArithmeticOpAnalyzer.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -39,6 +39,10 @@
 block discarded – undo
39 39
  */
40 40
 class NonDivArithmeticOpAnalyzer
41 41
 {
42
+    /**
43
+     * @param StatementsSource|null $statements_source
44
+     * @param Context $context
45
+     */
42 46
     public static function analyze(
43 47
         ?StatementsSource $statements_source,
44 48
         \Psalm\Internal\Provider\NodeDataProvider $nodes,
Please login to merge, or discard this patch.
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php 2 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
 {
48 48
     /**
49 49
      * @param  ?string $self_fq_class_name
50
-     * @param  ?string $static_fq_class_name
50
+     * @param  string|null $static_fq_class_name
51 51
      * @param  array<string, array<string, array{Type\Union, 1?:int}>> $class_generic_params
52
+     * @param FunctionLikeParameter|null $function_param
52 53
      * @return false|null
53 54
      */
54 55
     public static function checkArgumentMatches(
@@ -414,6 +415,7 @@  discard block
 block discarded – undo
414 415
 
415 416
     /**
416 417
      * @param Type\Atomic\ObjectLike|Type\Atomic\TArray|Type\Atomic\TList $unpacked_atomic_array
418
+     * @param null|Type\Union $signature_param_type
417 419
      * @return  null|false
418 420
      */
419 421
     public static function verifyType(
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,6 @@
 block discarded – undo
38 38
 use function strpos;
39 39
 use function explode;
40 40
 use function in_array;
41
-use Psalm\Issue\TaintedInput;
42 41
 
43 42
 /**
44 43
  * @internal
Please login to merge, or discard this patch.
Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -693,6 +693,7 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.