Test Setup Failed
Pull Request — master (#3650)
by Olle
05:22
created
src/Psalm/Internal/Codebase/Taint.php 1 patch
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -2,11 +2,6 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Psalm\Internal\Codebase;
4 4
 
5
-use Psalm\CodeLocation;
6
-use Psalm\Internal\Analyzer\StatementsAnalyzer;
7
-use Psalm\Internal\Provider\ClassLikeStorageProvider;
8
-use Psalm\Internal\Provider\FileReferenceProvider;
9
-use Psalm\Internal\Provider\FileStorageProvider;
10 5
 use Psalm\Internal\Taint\Path;
11 6
 use Psalm\Internal\Taint\Sink;
12 7
 use Psalm\Internal\Taint\Source;
@@ -17,7 +12,6 @@  discard block
 block discarded – undo
17 12
 use function array_merge;
18 13
 use function array_merge_recursive;
19 14
 use function strtolower;
20
-use UnexpectedValueException;
21 15
 use function count;
22 16
 use function implode;
23 17
 use function substr;
Please login to merge, or discard this patch.
src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php 1 patch
Doc Comments   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         if ($storage instanceof MethodStorage) {
405 405
             $non_null_param_types = array_filter(
406 406
                 $storage->params,
407
-                /** @return bool */
407
+                /** @return null|false */
408 408
                 function (FunctionLikeParameter $p) {
409 409
                     return $p->type !== null && $p->has_docblock_type;
410 410
                 }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         } else {
413 413
             $non_null_param_types = array_filter(
414 414
                 $storage->params,
415
-                /** @return bool */
415
+                /** @return null|false */
416 416
                 function (FunctionLikeParameter $p) {
417 417
                     return $p->type !== null;
418 418
                 }
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
         ) {
426 426
             $types_without_docblocks = array_filter(
427 427
                 $storage->params,
428
-                /** @return bool */
428
+                /** @return null|false */
429 429
                 function (FunctionLikeParameter $p) {
430 430
                     return !$p->type || !$p->has_docblock_type;
431 431
                 }
@@ -839,6 +839,9 @@  discard block
 block discarded – undo
839 839
         return null;
840 840
     }
841 841
 
842
+    /**
843
+     * @param \Psalm\Storage\ClassLikeStorage|null $class_storage
844
+     */
842 845
     private function checkParamReferences(
843 846
         StatementsAnalyzer $statements_analyzer,
844 847
         FunctionLikeStorage $storage,
@@ -962,6 +965,7 @@  discard block
 block discarded – undo
962 965
     /**
963 966
      * @param array<int, \Psalm\Storage\FunctionLikeParameter> $params
964 967
      * @param array<int, Type\Union> $implemented_docblock_param_types
968
+     * @param string|null $cased_method_id
965 969
      */
966 970
     private function processParams(
967 971
         StatementsAnalyzer $statements_analyzer,
@@ -1471,7 +1475,6 @@  discard block
 block discarded – undo
1471 1475
     /**
1472 1476
      * Adds return types for the given function
1473 1477
      *
1474
-     * @param   string  $return_type
1475 1478
      * @param   Context $context
1476 1479
      *
1477 1480
      * @return  void
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
@@ -691,6 +691,7 @@
 block discarded – undo
691 691
      * @param  string|null $cased_method_id
692 692
      * @param  FunctionLikeParameter|null $last_param
693 693
      * @param  array<int, FunctionLikeParameter> $function_params
694
+     * @param FunctionLikeParameter[] $function_params
694 695
      * @return false|null
695 696
      */
696 697
     private static function handlePossiblyMatchingByRefParam(
Please login to merge, or discard this patch.
Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -305,6 +305,9 @@  discard block
 block discarded – undo
305 305
         return true;
306 306
     }
307 307
 
308
+    /**
309
+     * @param null|string $keyed_array_var_id
310
+     */
308 311
     public static function taintArrayFetch(
309 312
         StatementsAnalyzer $statements_analyzer,
310 313
         PhpParser\Node\Expr $var,
@@ -1468,6 +1471,9 @@  discard block
 block discarded – undo
1468 1471
         return $array_access_type;
1469 1472
     }
1470 1473
 
1474
+    /**
1475
+     * @param null|string $array_var_id
1476
+     */
1471 1477
     private static function checkLiteralIntArrayOffset(
1472 1478
         Type\Union $offset_type,
1473 1479
         Type\Union $expected_offset_type,
@@ -1517,6 +1523,9 @@  discard block
 block discarded – undo
1517 1523
         }
1518 1524
     }
1519 1525
 
1526
+    /**
1527
+     * @param null|string $array_var_id
1528
+     */
1520 1529
     private static function checkLiteralStringArrayOffset(
1521 1530
         Type\Union $offset_type,
1522 1531
         Type\Union $expected_offset_type,
Please login to merge, or discard this patch.
src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,6 @@
 block discarded – undo
35 35
 use Psalm\Storage\FunctionLikeStorage;
36 36
 use Psalm\Storage\MethodStorage;
37 37
 use Psalm\Type;
38
-use Psalm\Internal\Type\TypeCombination;
39 38
 use function strtolower;
40 39
 use function substr;
41 40
 use function count;
Please login to merge, or discard this patch.
Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,6 @@
 block discarded – undo
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
-use Psalm\Internal\Codebase\InternalCallMapHandler;
14 12
 use Psalm\Internal\Type\ArrayType;
15 13
 use Psalm\StatementsSource;
16 14
 use Psalm\Type;
Please login to merge, or discard this patch.
src/Psalm/Type.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -439,6 +439,7 @@
 block discarded – undo
439 439
 
440 440
     /**
441 441
      * @param non-empty-list<Type\Union> $union_types
442
+     * @param Codebase|null $codebase
442 443
      */
443 444
     public static function combineUnionTypeArray(array $union_types, ?Codebase $codebase) : Type\Union
444 445
     {
Please login to merge, or discard this patch.