mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
Fix
This commit is contained in:
parent
55edadcb65
commit
78d64e3604
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<files psalm-version="dev-master@12188caad4b2e4fd7a49a7199e97af2ba1d4c58e">
|
<files psalm-version="dev-master@2b0e979ee9434afdeb9dd59a3219bf4029c62dc8">
|
||||||
<file src="examples/TemplateChecker.php">
|
<file src="examples/TemplateChecker.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||||
<code>$comment_block->tags['variablesfrom'][0]</code>
|
<code>$comment_block->tags['variablesfrom'][0]</code>
|
||||||
@ -13,8 +13,12 @@
|
|||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Codebase.php">
|
<file src="src/Psalm/Codebase.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
||||||
|
<code>$const_name</code>
|
||||||
|
<code>$const_name</code>
|
||||||
<code>$matches[0]</code>
|
<code>$matches[0]</code>
|
||||||
|
<code>$property_name</code>
|
||||||
|
<code>$symbol_name</code>
|
||||||
<code>$symbol_parts[1]</code>
|
<code>$symbol_parts[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
@ -31,17 +35,24 @@
|
|||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/ClassAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/ClassAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="3">
|
<PossiblyUndefinedIntArrayOffset occurrences="4">
|
||||||
<code>$comments[0]</code>
|
<code>$comments[0]</code>
|
||||||
|
<code>$property_name</code>
|
||||||
<code>$stmt->props[0]</code>
|
<code>$stmt->props[0]</code>
|
||||||
<code>$uninitialized_variables[0]</code>
|
<code>$uninitialized_variables[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$property_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/ProjectAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/ProjectAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="4">
|
<PossiblyUndefinedIntArrayOffset occurrences="5">
|
||||||
<code>$destination_parts[1]</code>
|
<code>$destination_parts[1]</code>
|
||||||
<code>$destination_parts[1]</code>
|
<code>$destination_parts[1]</code>
|
||||||
<code>$destination_parts[1]</code>
|
<code>$destination_parts[1]</code>
|
||||||
|
<code>$php_minor_version</code>
|
||||||
<code>$source_parts[1]</code>
|
<code>$source_parts[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
@ -50,9 +61,6 @@
|
|||||||
<code>if (AtomicTypeComparator::isContainedBy(</code>
|
<code>if (AtomicTypeComparator::isContainedBy(</code>
|
||||||
<code>if (AtomicTypeComparator::isContainedBy(</code>
|
<code>if (AtomicTypeComparator::isContainedBy(</code>
|
||||||
</ConflictingReferenceConstraint>
|
</ConflictingReferenceConstraint>
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
|
||||||
<code>$iterator_atomic_type->type_params[1]</code>
|
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
@ -72,9 +80,6 @@
|
|||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php">
|
||||||
<DeprecatedClass occurrences="1">
|
|
||||||
<code>new Atomic\TList(Type::getMixed())</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="28">
|
<PossiblyUndefinedIntArrayOffset occurrences="28">
|
||||||
<code>$assertion->rule[0]</code>
|
<code>$assertion->rule[0]</code>
|
||||||
<code>$assertion->rule[0]</code>
|
<code>$assertion->rule[0]</code>
|
||||||
@ -106,12 +111,10 @@
|
|||||||
<code>$gettype_expr->getArgs()[0]</code>
|
<code>$gettype_expr->getArgs()[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/ArrayAssignmentAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/StaticPropertyAssignmentAnalyzer.php">
|
||||||
<DeprecatedClass occurrences="3">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$array_atomic_type</code>
|
<code>$new_property_name</code>
|
||||||
<code>$array_atomic_type</code>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
<code>$array_atomic_type</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ArithmeticOpAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||||
@ -123,45 +126,32 @@
|
|||||||
<ComplexMethod occurrences="1">
|
<ComplexMethod occurrences="1">
|
||||||
<code>verifyType</code>
|
<code>verifyType</code>
|
||||||
</ComplexMethod>
|
</ComplexMethod>
|
||||||
<DeprecatedClass occurrences="4">
|
|
||||||
<code>$array_type</code>
|
|
||||||
<code>$unpacked_atomic_array</code>
|
|
||||||
<code>TKeyedArray|TArray|TClassStringMap</code>
|
|
||||||
<code>TKeyedArray|TArray|TClassStringMap|null</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="3">
|
<PossiblyUndefinedIntArrayOffset occurrences="3">
|
||||||
<code>$non_existent_method_ids[0]</code>
|
<code>$method_name</code>
|
||||||
<code>$parts[1]</code>
|
<code>$parts[1]</code>
|
||||||
<code>explode('::', $cased_method_id)[1]</code>
|
<code>explode('::', $cased_method_id)[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php">
|
|
||||||
<DeprecatedClass occurrences="2">
|
|
||||||
<code>$array_type</code>
|
|
||||||
<code>$array_type</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
|
||||||
<code>$arg_function_params[$argument_offset][0]</code>
|
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
|
||||||
</file>
|
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArrayFunctionArgumentsAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArrayFunctionArgumentsAnalyzer.php">
|
||||||
<DeprecatedClass occurrences="4">
|
<PossiblyUndefinedIntArrayOffset occurrences="5">
|
||||||
<code>$array_arg_type</code>
|
|
||||||
<code>$array_type</code>
|
|
||||||
<code>$array_type</code>
|
|
||||||
<code>$replacement_array_type</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="4">
|
|
||||||
<code>$args[0]</code>
|
<code>$args[0]</code>
|
||||||
<code>$args[0]</code>
|
<code>$args[0]</code>
|
||||||
<code>$args[1]</code>
|
<code>$args[1]</code>
|
||||||
<code>$callmap_callables[0]</code>
|
<code>$callmap_callables[0]</code>
|
||||||
|
<code>$method_name</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedArrayOffset occurrences="1">
|
||||||
<code>$parts[1]</code>
|
|
||||||
<code>$stmt->getArgs()[0]</code>
|
<code>$stmt->getArgs()[0]</code>
|
||||||
|
</PossiblyUndefinedArrayOffset>
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$parts[1]</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallReturnTypeFetcher.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$method</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/MethodCallAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/MethodCallAnalyzer.php">
|
||||||
@ -174,21 +164,24 @@
|
|||||||
<code>$result->non_existent_magic_method_ids[0]</code>
|
<code>$result->non_existent_magic_method_ids[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/StaticMethod/ExistingAtomicStaticCallAnalyzer.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$new_method_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||||
<code>$callable_arg->items[0]</code>
|
<code>$callable_arg->items[0]</code>
|
||||||
<code>$callable_arg->items[1]</code>
|
<code>$callable_arg->items[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/ClassConstAnalyzer.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||||
|
<code>$new_const_name</code>
|
||||||
|
<code>$new_const_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php">
|
||||||
<DeprecatedClass occurrences="6">
|
|
||||||
<code>$array_type</code>
|
|
||||||
<code>$array_type</code>
|
|
||||||
<code>$type</code>
|
|
||||||
<code>$type</code>
|
|
||||||
<code>TArray|TKeyedArray|TClassStringMap</code>
|
|
||||||
<code>TList</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
<ReferenceConstraintViolation occurrences="3">
|
<ReferenceConstraintViolation occurrences="3">
|
||||||
<code>$stmt_type</code>
|
<code>$stmt_type</code>
|
||||||
<code>$stmt_type</code>
|
<code>$stmt_type</code>
|
||||||
@ -205,11 +198,21 @@
|
|||||||
<code>$invalid_fetch_types[0]</code>
|
<code>$invalid_fetch_types[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/StaticPropertyFetchAnalyzer.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$new_property_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/YieldAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/YieldAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$atomic_return_type->type_params[2]</code>
|
<code>$atomic_return_type->type_params[2]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$method_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php">
|
<file src="src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
||||||
<code>$token_list[$iter]</code>
|
<code>$token_list[$iter]</code>
|
||||||
@ -221,14 +224,38 @@
|
|||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Analyzer/StatementsAnalyzer.php">
|
<file src="src/Psalm/Internal/Analyzer/StatementsAnalyzer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
<PossiblyUndefinedArrayOffset occurrences="1">
|
||||||
<code>$stmt->expr->getArgs()[0]</code>
|
<code>$stmt->expr->getArgs()[0]</code>
|
||||||
|
</PossiblyUndefinedArrayOffset>
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$check_type_string</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Cli/Refactor.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$identifier_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Codebase/Analyzer.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$trait</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Codebase/ClassLikes.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="5">
|
||||||
|
<code>$destination_name</code>
|
||||||
|
<code>$destination_name</code>
|
||||||
|
<code>$destination_name</code>
|
||||||
|
<code>$source_const_name</code>
|
||||||
|
<code>$stub</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Codebase/Functions.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
|
<code>$stub</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Codebase/InternalCallMapHandler.php">
|
<file src="src/Psalm/Internal/Codebase/InternalCallMapHandler.php">
|
||||||
<DeprecatedClass occurrences="1">
|
|
||||||
<code>$array_atomic_type</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||||
<code>$callables[0]</code>
|
<code>$callables[0]</code>
|
||||||
<code>$callables[0]</code>
|
<code>$callables[0]</code>
|
||||||
@ -239,6 +266,16 @@
|
|||||||
<code>$function_callables[0]</code>
|
<code>$function_callables[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Codebase/Properties.php">
|
||||||
|
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
||||||
|
<code>$property_name</code>
|
||||||
|
<code>$property_name</code>
|
||||||
|
<code>$property_name</code>
|
||||||
|
<code>$property_name</code>
|
||||||
|
<code>$property_name</code>
|
||||||
|
<code>$property_name</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Diff/ClassStatementsDiffer.php">
|
<file src="src/Psalm/Internal/Diff/ClassStatementsDiffer.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
||||||
<code>$a->props[0]</code>
|
<code>$a->props[0]</code>
|
||||||
@ -249,6 +286,11 @@
|
|||||||
<code>$b_stmt_comments[0]</code>
|
<code>$b_stmt_comments[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Diff/FileDiffer.php">
|
||||||
|
<InvalidArrayOffset occurrences="1">
|
||||||
|
<code>$b[$y]</code>
|
||||||
|
</InvalidArrayOffset>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/FileManipulation/PropertyDocblockManipulator.php">
|
<file src="src/Psalm/Internal/FileManipulation/PropertyDocblockManipulator.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$stmt->props[0]</code>
|
<code>$stmt->props[0]</code>
|
||||||
@ -314,8 +356,7 @@
|
|||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockParser.php">
|
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockParser.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$line_parts[1]</code>
|
|
||||||
<code>$since_parts[1]</code>
|
<code>$since_parts[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
<RedundantCondition occurrences="1">
|
<RedundantCondition occurrences="1">
|
||||||
@ -323,11 +364,11 @@
|
|||||||
</RedundantCondition>
|
</RedundantCondition>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php">
|
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php">
|
||||||
<DeprecatedClass occurrences="1">
|
<PossiblyInvalidArrayOffset occurrences="1">
|
||||||
<code>$array_type</code>
|
<code>$fixed_type_tokens[$i - 1]</code>
|
||||||
</DeprecatedClass>
|
</PossiblyInvalidArrayOffset>
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$flow_parts[0]</code>
|
<code>$source_param_string</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php">
|
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeNodeScanner.php">
|
||||||
@ -340,32 +381,26 @@
|
|||||||
<code>$cs[0]</code>
|
<code>$cs[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Provider/ReturnTypeProvider/InArrayReturnTypeProvider.php">
|
<file src="src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php">
|
||||||
<DeprecatedClass occurrences="1">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$array_arg_type</code>
|
<code>$callable_method_name</code>
|
||||||
</DeprecatedClass>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Scanner/PhpStormMetaScanner.php">
|
<file src="src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMergeReturnTypeProvider.php">
|
||||||
<DeprecatedClass occurrences="2">
|
<InvalidArgument occurrences="1">
|
||||||
<code>$array_atomic_type</code>
|
<code>$class_strings ?: null</code>
|
||||||
<code>$array_atomic_type</code>
|
</InvalidArgument>
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/Comparator/ArrayTypeComparator.php">
|
<file src="src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayReduceReturnTypeProvider.php">
|
||||||
<DeprecatedClass occurrences="6">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$container_type_part</code>
|
<code>$method_name</code>
|
||||||
<code>$container_type_part</code>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
<code>$input_type_part</code>
|
|
||||||
<code>$input_type_part</code>
|
|
||||||
<code>TArray|TKeyedArray|TClassStringMap</code>
|
|
||||||
<code>TArray|TKeyedArray|TClassStringMap</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php">
|
<file src="src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php">
|
||||||
<DeprecatedClass occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
||||||
<code>TList::class</code>
|
<code>$array->properties[0]</code>
|
||||||
<code>TList::class</code>
|
<code>$array->properties[0]</code>
|
||||||
</DeprecatedClass>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/Comparator/CallableTypeComparator.php">
|
<file src="src/Psalm/Internal/Type/Comparator/CallableTypeComparator.php">
|
||||||
<LessSpecificReturnStatement occurrences="1">
|
<LessSpecificReturnStatement occurrences="1">
|
||||||
@ -376,9 +411,12 @@
|
|||||||
</MoreSpecificReturnType>
|
</MoreSpecificReturnType>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/SimpleAssertionReconciler.php">
|
<file src="src/Psalm/Internal/Type/SimpleAssertionReconciler.php">
|
||||||
<DeprecatedClass occurrences="3">
|
<PossiblyUndefinedIntArrayOffset occurrences="4">
|
||||||
<code>TList::class</code>
|
<code>$array_atomic_type->properties[0]</code>
|
||||||
</DeprecatedClass>
|
<code>$properties[0]</code>
|
||||||
|
<code>$properties[0]</code>
|
||||||
|
<code>$properties[0]</code>
|
||||||
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php">
|
<file src="src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php">
|
||||||
<ImpureMethodCall occurrences="2">
|
<ImpureMethodCall occurrences="2">
|
||||||
@ -387,8 +425,8 @@
|
|||||||
</ImpureMethodCall>
|
</ImpureMethodCall>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/TypeCombiner.php">
|
<file src="src/Psalm/Internal/Type/TypeCombiner.php">
|
||||||
<DeprecatedClass occurrences="1"/>
|
<PossiblyUndefinedIntArrayOffset occurrences="7">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="6">
|
<code>$combination->array_type_params[1]</code>
|
||||||
<code>$combination->array_type_params[1]</code>
|
<code>$combination->array_type_params[1]</code>
|
||||||
<code>$combination->array_type_params[1]</code>
|
<code>$combination->array_type_params[1]</code>
|
||||||
<code>$combination->array_type_params[1]</code>
|
<code>$combination->array_type_params[1]</code>
|
||||||
@ -397,8 +435,15 @@
|
|||||||
<code>$combination->array_type_params[1]</code>
|
<code>$combination->array_type_params[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Type/TypeExpander.php">
|
||||||
|
<InvalidArgument occurrences="1">
|
||||||
|
<code>$fallback_params</code>
|
||||||
|
</InvalidArgument>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Internal/Type/TypeParser.php">
|
<file src="src/Psalm/Internal/Type/TypeParser.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="8">
|
<PossiblyUndefinedIntArrayOffset occurrences="10">
|
||||||
|
<code>$const_name</code>
|
||||||
|
<code>$const_name</code>
|
||||||
<code>$intersection_types[0]</code>
|
<code>$intersection_types[0]</code>
|
||||||
<code>$parse_tree->children[0]</code>
|
<code>$parse_tree->children[0]</code>
|
||||||
<code>$parse_tree->condition->children[0]</code>
|
<code>$parse_tree->condition->children[0]</code>
|
||||||
@ -409,6 +454,25 @@
|
|||||||
<code>array_keys($template_type_map[$template_param_name])[0]</code>
|
<code>array_keys($template_type_map[$template_param_name])[0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/Psalm/Internal/Type/TypeTokenizer.php">
|
||||||
|
<InvalidArrayOffset occurrences="1">
|
||||||
|
<code>$chars[$i - 1]</code>
|
||||||
|
</InvalidArrayOffset>
|
||||||
|
<PossiblyInvalidArrayOffset occurrences="7">
|
||||||
|
<code>$type_tokens[$i - 1]</code>
|
||||||
|
<code>$type_tokens[$i - 1]</code>
|
||||||
|
<code>$type_tokens[$i - 1]</code>
|
||||||
|
<code>$type_tokens[$i - 1]</code>
|
||||||
|
<code>$type_tokens[$i - 1]</code>
|
||||||
|
<code>$type_tokens[$i - 1]</code>
|
||||||
|
<code>$type_tokens[$i - 2]</code>
|
||||||
|
</PossiblyInvalidArrayOffset>
|
||||||
|
</file>
|
||||||
|
<file src="src/Psalm/Storage/Assertion/HasArrayKey.php">
|
||||||
|
<PossiblyUnusedMethod occurrences="1">
|
||||||
|
<code>__construct</code>
|
||||||
|
</PossiblyUnusedMethod>
|
||||||
|
</file>
|
||||||
<file src="src/Psalm/Storage/ClassConstantStorage.php">
|
<file src="src/Psalm/Storage/ClassConstantStorage.php">
|
||||||
<MutableDependency occurrences="1">
|
<MutableDependency occurrences="1">
|
||||||
<code>CustomMetadataTrait</code>
|
<code>CustomMetadataTrait</code>
|
||||||
@ -423,11 +487,10 @@
|
|||||||
</ImpureMethodCall>
|
</ImpureMethodCall>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Type.php">
|
<file src="src/Psalm/Type.php">
|
||||||
<DeprecatedClass occurrences="3">
|
<ImpureMethodCall occurrences="2">
|
||||||
<code>new TCallableList($of, null, null, $from_docblock)</code>
|
<code>getListKey</code>
|
||||||
<code>new TList($of, $from_docblock)</code>
|
<code>getListKey</code>
|
||||||
<code>new TNonEmptyList($of, null, null, $from_docblock)</code>
|
</ImpureMethodCall>
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Type/Atomic.php">
|
<file src="src/Psalm/Type/Atomic.php">
|
||||||
<ImpureMethodCall occurrences="12">
|
<ImpureMethodCall occurrences="12">
|
||||||
@ -465,6 +528,10 @@
|
|||||||
<code>replace</code>
|
<code>replace</code>
|
||||||
<code>replace</code>
|
<code>replace</code>
|
||||||
</ImpureMethodCall>
|
</ImpureMethodCall>
|
||||||
|
<InvalidReturnType occurrences="2">
|
||||||
|
<code>TTypeParams|null</code>
|
||||||
|
<code>TTypeParams|null</code>
|
||||||
|
</InvalidReturnType>
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
<PossiblyUndefinedIntArrayOffset occurrences="1">
|
||||||
<code>$this->type_params[1]</code>
|
<code>$this->type_params[1]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
@ -474,11 +541,6 @@
|
|||||||
<code>getMostSpecificTypeFromBounds</code>
|
<code>getMostSpecificTypeFromBounds</code>
|
||||||
</ImpureMethodCall>
|
</ImpureMethodCall>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Type/Atomic/TCallableList.php">
|
|
||||||
<DeprecatedClass occurrences="1">
|
|
||||||
<code>TNonEmptyList</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
|
||||||
<file src="src/Psalm/Type/Atomic/TClassString.php">
|
<file src="src/Psalm/Type/Atomic/TClassString.php">
|
||||||
<ImpureMethodCall occurrences="1">
|
<ImpureMethodCall occurrences="1">
|
||||||
<code>replace</code>
|
<code>replace</code>
|
||||||
@ -501,7 +563,7 @@
|
|||||||
</ImpureMethodCall>
|
</ImpureMethodCall>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Type/Atomic/TKeyedArray.php">
|
<file src="src/Psalm/Type/Atomic/TKeyedArray.php">
|
||||||
<ImpureMethodCall occurrences="10">
|
<ImpureMethodCall occurrences="14">
|
||||||
<code>combine</code>
|
<code>combine</code>
|
||||||
<code>combine</code>
|
<code>combine</code>
|
||||||
<code>combineUnionTypes</code>
|
<code>combineUnionTypes</code>
|
||||||
@ -510,26 +572,25 @@
|
|||||||
<code>combineUnionTypes</code>
|
<code>combineUnionTypes</code>
|
||||||
<code>combineUnionTypes</code>
|
<code>combineUnionTypes</code>
|
||||||
<code>combineUnionTypes</code>
|
<code>combineUnionTypes</code>
|
||||||
|
<code>combineUnionTypes</code>
|
||||||
|
<code>getListKey</code>
|
||||||
|
<code>replace</code>
|
||||||
|
<code>replace</code>
|
||||||
<code>replace</code>
|
<code>replace</code>
|
||||||
<code>replace</code>
|
<code>replace</code>
|
||||||
</ImpureMethodCall>
|
</ImpureMethodCall>
|
||||||
<ImpurePropertyAssignment occurrences="1">
|
<ImpurePropertyAssignment occurrences="1">
|
||||||
<code>$key_type->possibly_undefined</code>
|
<code>$key_type->possibly_undefined</code>
|
||||||
</ImpurePropertyAssignment>
|
</ImpurePropertyAssignment>
|
||||||
</file>
|
<InvalidPropertyAssignmentValue occurrences="2">
|
||||||
<file src="src/Psalm/Type/Atomic/TList.php">
|
<code>$fallback_params</code>
|
||||||
<ImpureMethodCall occurrences="2">
|
<code>$fallback_params</code>
|
||||||
<code>replace</code>
|
</InvalidPropertyAssignmentValue>
|
||||||
<code>replace</code>
|
<PossiblyUndefinedIntArrayOffset occurrences="3">
|
||||||
</ImpureMethodCall>
|
<code>$this->properties[0]</code>
|
||||||
<ImpurePropertyAssignment occurrences="1">
|
<code>$this->properties[0]</code>
|
||||||
<code>$cloned->type_param</code>
|
<code>$this->properties[0]</code>
|
||||||
</ImpurePropertyAssignment>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
</file>
|
|
||||||
<file src="src/Psalm/Type/Atomic/TNonEmptyList.php">
|
|
||||||
<DeprecatedClass occurrences="1">
|
|
||||||
<code>TList</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Type/Atomic/TObjectWithProperties.php">
|
<file src="src/Psalm/Type/Atomic/TObjectWithProperties.php">
|
||||||
<ImpureMethodCall occurrences="2">
|
<ImpureMethodCall occurrences="2">
|
||||||
@ -564,7 +625,8 @@
|
|||||||
</PossiblyUnusedProperty>
|
</PossiblyUnusedProperty>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Psalm/Type/Reconciler.php">
|
<file src="src/Psalm/Type/Reconciler.php">
|
||||||
<PossiblyUndefinedIntArrayOffset occurrences="2">
|
<PossiblyUndefinedIntArrayOffset occurrences="3">
|
||||||
|
<code>$const_name</code>
|
||||||
<code>$type[0]</code>
|
<code>$type[0]</code>
|
||||||
<code>$type[0][0]</code>
|
<code>$type[0][0]</code>
|
||||||
</PossiblyUndefinedIntArrayOffset>
|
</PossiblyUndefinedIntArrayOffset>
|
||||||
@ -596,11 +658,6 @@
|
|||||||
<code>allFloatLiterals</code>
|
<code>allFloatLiterals</code>
|
||||||
</PossiblyUnusedMethod>
|
</PossiblyUnusedMethod>
|
||||||
</file>
|
</file>
|
||||||
<file src="tests/Config/Plugin/Hook/CustomArrayMapFunctionStorageProvider.php">
|
|
||||||
<DeprecatedClass occurrences="1">
|
|
||||||
<code>new Type\Atomic\TList($last_callable_arg->return_type ?? Type::getMixed())</code>
|
|
||||||
</DeprecatedClass>
|
|
||||||
</file>
|
|
||||||
<file src="tests/Internal/Codebase/InternalCallMapHandlerTest.php">
|
<file src="tests/Internal/Codebase/InternalCallMapHandlerTest.php">
|
||||||
<UnusedPsalmSuppress occurrences="1">
|
<UnusedPsalmSuppress occurrences="1">
|
||||||
<code>UndefinedMethod</code>
|
<code>UndefinedMethod</code>
|
||||||
@ -611,4 +668,64 @@
|
|||||||
<code>$subNodes['expr']</code>
|
<code>$subNodes['expr']</code>
|
||||||
</PossiblyUndefinedStringArrayOffset>
|
</PossiblyUndefinedStringArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$parts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$conds</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Name.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>self::prepareName($name)</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
|
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php">
|
||||||
|
<InvalidPropertyAssignmentValue occurrences="1">
|
||||||
|
<code>$stmts</code>
|
||||||
|
</InvalidPropertyAssignmentValue>
|
||||||
|
</file>
|
||||||
</files>
|
</files>
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
<directory name="vendor/netresearch/jsonmapper" />
|
<directory name="vendor/netresearch/jsonmapper" />
|
||||||
<directory name="vendor/phpunit" />
|
<directory name="vendor/phpunit" />
|
||||||
<directory name="vendor/mockery/mockery"/>
|
<directory name="vendor/mockery/mockery"/>
|
||||||
<directory name="vendor/nikic/php-parser"/>
|
|
||||||
<file name="vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php" />
|
<file name="vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php" />
|
||||||
</ignoreFiles>
|
</ignoreFiles>
|
||||||
</projectFiles>
|
</projectFiles>
|
||||||
|
@ -75,6 +75,10 @@ class ArrayMapReturnTypeProvider implements FunctionReturnTypeProviderInterface
|
|||||||
if ($function_call_type && $function_call_type->isNull()) {
|
if ($function_call_type && $function_call_type->isNull()) {
|
||||||
array_shift($call_args);
|
array_shift($call_args);
|
||||||
|
|
||||||
|
if (!$call_args) {
|
||||||
|
return Type::getNever();
|
||||||
|
}
|
||||||
|
|
||||||
$array_arg_types = [];
|
$array_arg_types = [];
|
||||||
$orig_types = [];
|
$orig_types = [];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user