Skip to content

Variadic params should always be optional and fix redundant optional variadic annotation #12988

Variadic params should always be optional and fix redundant optional variadic annotation

Variadic params should always be optional and fix redundant optional variadic annotation #12988

Status Failure
Total duration 1m 3s
Artifacts

shepherd.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
DocblockTypeContradiction: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L836
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:836:25: DocblockTypeContradiction: Cannot resolve types for $array_type - docblock-defined type Psalm\Type\Atomic\TArray|Psalm\Type\Atomic\TCallableKeyedArray does not contain Psalm\Type\Atomic\TClassStringMap (see https://psalm.dev/155)
RedundantCondition: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L840
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:840:31: RedundantCondition: Type list{Psalm\Type\Union, Psalm\Type\Union} for $array_type->type_params is always isset (see https://psalm.dev/122)
UndefinedPropertyFetch: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L844
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:844:25: UndefinedPropertyFetch: Instance property Psalm\Type\Atomic\TCallableKeyedArray::$type_params is not defined (see https://psalm.dev/039)
MixedArrayAccess: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L844
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:844:25: MixedArrayAccess: Cannot access array value on mixed variable $array_type->type_params (see https://psalm.dev/051)
MixedMethodCall: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L844
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:844:54: MixedMethodCall: Cannot determine the type of $array_type->type_params[0] when calling method isString (see https://psalm.dev/015)
MixedArrayAccess: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L855
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:855:32: MixedArrayAccess: Cannot access array value on mixed variable $array_type->type_params (see https://psalm.dev/051)
MixedMethodCall: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L855
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:855:61: MixedMethodCall: Cannot determine the type of $array_type->type_params[0] when calling method isInt (see https://psalm.dev/015)
PossibleRawObjectIteration: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L869
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:869:30: PossibleRawObjectIteration: Possibly undesired iteration over regular object Psalm\Type\Union (see https://psalm.dev/208)
RiskyTruthyFalsyComparison: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L1002
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:1002:59: RiskyTruthyFalsyComparison: Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
RiskyTruthyFalsyComparison: src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php#L1006
src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentsAnalyzer.php:1006:22: RiskyTruthyFalsyComparison: Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)