@@ -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, |
@@ -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, |
@@ -271,6 +271,7 @@ discard block |
||
| 271 | 271 | |
| 272 | 272 | /** |
| 273 | 273 | * @psalm-return false|null |
| 274 | + * @param null|Context $global_context |
|
| 274 | 275 | */ |
| 275 | 276 | private static function analyzeStatement( |
| 276 | 277 | StatementsAnalyzer $statements_analyzer, |
@@ -344,9 +345,9 @@ discard block |
||
| 344 | 345 | $suppressed = array_filter( |
| 345 | 346 | array_map( |
| 346 | 347 | /** |
| 347 | - * @param string $line |
|
| 348 | + * @param StatementsAnalyzer $line |
|
| 348 | 349 | * |
| 349 | - * @return string |
|
| 350 | + * @return false|null |
|
| 350 | 351 | */ |
| 351 | 352 | function ($line) { |
| 352 | 353 | return preg_split('/[\s]+/', $line)[0]; |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | /** |
| 305 | 305 | * Used for comparing signature typehints, uses PHP's light contravariance rules |
| 306 | 306 | * |
| 307 | - * @param ?Type\Union $input_type |
|
| 307 | + * @param Type\Union|null $input_type |
|
| 308 | 308 | * @param Type\Union $container_type |
| 309 | 309 | * |
| 310 | 310 | * @return bool |
@@ -501,8 +501,8 @@ discard block |
||
| 501 | 501 | |
| 502 | 502 | /** |
| 503 | 503 | * @param Codebase $codebase |
| 504 | - * @param TNamedObject|TTemplateParam|TIterable $input_type_part |
|
| 505 | - * @param TNamedObject|TTemplateParam|TIterable $container_type_part |
|
| 504 | + * @param Type\Atomic $input_type_part |
|
| 505 | + * @param Type\Atomic $container_type_part |
|
| 506 | 506 | * @param bool $allow_interface_equality |
| 507 | 507 | * |
| 508 | 508 | * @return bool |
@@ -765,6 +765,7 @@ discard block |
||
| 765 | 765 | |
| 766 | 766 | /** |
| 767 | 767 | * Does the input param atomic type match the given param atomic type |
| 768 | + * @param TypeComparisonResult $atomic_comparison_result |
|
| 768 | 769 | */ |
| 769 | 770 | public static function isAtomicContainedBy( |
| 770 | 771 | Codebase $codebase, |
@@ -1913,6 +1914,7 @@ discard block |
||
| 1913 | 1914 | } |
| 1914 | 1915 | |
| 1915 | 1916 | /** |
| 1917 | + * @param TCallable $container_type_part |
|
| 1916 | 1918 | * @return ?TCallable |
| 1917 | 1919 | */ |
| 1918 | 1920 | public static function getCallableFromAtomic( |
@@ -2388,7 +2390,7 @@ discard block |
||
| 2388 | 2390 | $container_params_can_be_undefined = (bool) array_reduce( |
| 2389 | 2391 | $container_type_part->properties, |
| 2390 | 2392 | /** |
| 2391 | - * @param bool $carry |
|
| 2393 | + * @param Codebase $carry |
|
| 2392 | 2394 | * |
| 2393 | 2395 | * @return bool |
| 2394 | 2396 | */ |
@@ -343,8 +343,8 @@ discard block |
||
| 343 | 343 | |
| 344 | 344 | $analysis_worker = |
| 345 | 345 | /** |
| 346 | - * @param int $_ |
|
| 347 | - * @param string $file_path |
|
| 346 | + * @param ProjectAnalyzer $_ |
|
| 347 | + * @param integer $file_path |
|
| 348 | 348 | * |
| 349 | 349 | * @return array |
| 350 | 350 | */ |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | |
| 364 | 364 | $task_done_closure = |
| 365 | 365 | /** |
| 366 | - * @param array<IssueData> $issues |
|
| 366 | + * @param ProjectAnalyzer $issues |
|
| 367 | 367 | */ |
| 368 | 368 | function (array $issues): void { |
| 369 | 369 | $has_error = false; |
@@ -1399,6 +1399,7 @@ discard block |
||
| 1399 | 1399 | * @param string $file_path |
| 1400 | 1400 | * @param int $start |
| 1401 | 1401 | * @param int $end |
| 1402 | + * @param string $issue_type |
|
| 1402 | 1403 | * |
| 1403 | 1404 | * @return list<IssueData> |
| 1404 | 1405 | */ |
@@ -1425,6 +1426,7 @@ discard block |
||
| 1425 | 1426 | * @param string $file_path |
| 1426 | 1427 | * @param int $start |
| 1427 | 1428 | * @param int $end |
| 1429 | + * @param string $issue_type |
|
| 1428 | 1430 | * |
| 1429 | 1431 | * @return void |
| 1430 | 1432 | */ |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | /** |
| 710 | - * @param lowercase-string $fq_class_name |
|
| 710 | + * @param string $fq_class_name |
|
| 711 | 711 | * |
| 712 | 712 | * @return bool |
| 713 | 713 | */ |
@@ -780,6 +780,7 @@ discard block |
||
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | /** |
| 783 | + * @param Progress $progress |
|
| 783 | 784 | * @return void |
| 784 | 785 | */ |
| 785 | 786 | public function consolidateAnalyzedData(Methods $methods, ?Progress $progress, bool $find_unused_code) |
@@ -1083,7 +1084,7 @@ discard block |
||
| 1083 | 1084 | } |
| 1084 | 1085 | |
| 1085 | 1086 | /** |
| 1086 | - * @param lowercase-string|null $calling_method_id |
|
| 1087 | + * @param null|string $calling_method_id |
|
| 1087 | 1088 | */ |
| 1088 | 1089 | public function handleClassLikeReferenceInMigration( |
| 1089 | 1090 | \Psalm\Codebase $codebase, |
@@ -1266,7 +1267,7 @@ discard block |
||
| 1266 | 1267 | } |
| 1267 | 1268 | |
| 1268 | 1269 | /** |
| 1269 | - * @param lowercase-string|null $calling_method_id |
|
| 1270 | + * @param null|string $calling_method_id |
|
| 1270 | 1271 | */ |
| 1271 | 1272 | public function handleDocblockTypeInMigration( |
| 1272 | 1273 | \Psalm\Codebase $codebase, |
@@ -1501,6 +1502,9 @@ discard block |
||
| 1501 | 1502 | throw new \InvalidArgumentException('Must specify $visibility'); |
| 1502 | 1503 | } |
| 1503 | 1504 | |
| 1505 | + /** |
|
| 1506 | + * @param \Psalm\Internal\Analyzer\StatementsAnalyzer $statements_analyzer |
|
| 1507 | + */ |
|
| 1504 | 1508 | public function getConstantForClass( |
| 1505 | 1509 | string $class_name, |
| 1506 | 1510 | string $constant_name, |
@@ -2295,7 +2299,7 @@ discard block |
||
| 2295 | 2299 | } |
| 2296 | 2300 | |
| 2297 | 2301 | /** |
| 2298 | - * @param lowercase-string $fq_classlike_name_lc |
|
| 2302 | + * @param string $fq_classlike_name_lc |
|
| 2299 | 2303 | * |
| 2300 | 2304 | * @return void |
| 2301 | 2305 | */ |
@@ -2305,7 +2309,7 @@ discard block |
||
| 2305 | 2309 | } |
| 2306 | 2310 | |
| 2307 | 2311 | /** |
| 2308 | - * @param lowercase-string $fq_classlike_name_lc |
|
| 2312 | + * @param string $fq_classlike_name_lc |
|
| 2309 | 2313 | * |
| 2310 | 2314 | * @return bool |
| 2311 | 2315 | */ |
@@ -2316,7 +2320,7 @@ discard block |
||
| 2316 | 2320 | } |
| 2317 | 2321 | |
| 2318 | 2322 | /** |
| 2319 | - * @param lowercase-string $fq_classlike_name_lc |
|
| 2323 | + * @param string $fq_classlike_name_lc |
|
| 2320 | 2324 | * |
| 2321 | 2325 | * @return bool |
| 2322 | 2326 | */ |