Skip to content

Allow specifying a custom default template type/begin implementing @satisfies #12553

Allow specifying a custom default template type/begin implementing @satisfies

Allow specifying a custom default template type/begin implementing @satisfies #12553

Triggered via pull request January 19, 2024 19:22
Status Failure
Total duration 1m 5s
Artifacts

shepherd.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
RiskyTruthyFalsyComparison: src/Psalm/Internal/Analyzer/Statements/Expression/Call/NewAnalyzer.php#L495
src/Psalm/Internal/Analyzer/Statements/Expression/Call/NewAnalyzer.php:495:17: RiskyTruthyFalsyComparison: Operand of type array<string, non-empty-array<string, Psalm\Type\Union>>|null contains type array<string, non-empty-array<string, Psalm\Type\Union>>, 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/NewAnalyzer.php#L551
src/Psalm/Internal/Analyzer/Statements/Expression/Call/NewAnalyzer.php:551:19: RiskyTruthyFalsyComparison: Operand of type array<string, non-empty-array<string, Psalm\Type\Union>>|null contains type array<string, non-empty-array<string, Psalm\Type\Union>>, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
PossiblyNullArgument: src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php#L114
src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php:114:21: PossiblyNullArgument: Argument 2 of Psalm\Internal\Type\Comparator\UnionTypeComparator::isContainedBy cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullArgument: src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php#L115
src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php:115:21: PossiblyNullArgument: Argument 3 of Psalm\Internal\Type\Comparator\UnionTypeComparator::isContainedBy cannot be null, possibly null value provided (see https://psalm.dev/078)
PossiblyNullArgument: src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php#L125
src/Psalm/Internal/Type/Comparator/AtomicTypeComparator.php:125:21: PossiblyNullArgument: Argument 2 of Psalm\Internal\Type\Comparator\UnionTypeComparator::isContainedBy cannot be null, possibly null value provided (see https://psalm.dev/078)
InvalidArgument: src/Psalm/Internal/Type/SimpleAssertionReconciler.php#L530
src/Psalm/Internal/Type/SimpleAssertionReconciler.php:530:74: InvalidArgument: Argument 1 of Psalm\Type\Union::__construct expects non-empty-array<array-key, Psalm\Type\Atomic>, but list{Psalm\Type\Atomic|Psalm\Type\Union} provided (see https://psalm.dev/004)
ImpurePropertyAssignment: src/Psalm/Internal/Type/TemplateInferredTypeReplacer.php#L248
src/Psalm/Internal/Type/TemplateInferredTypeReplacer.php:248:13: ImpurePropertyAssignment: Cannot assign to a property from a mutation-free context (see https://psalm.dev/204)
MoreSpecificReturnType: src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php#L194
src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php:194:16: MoreSpecificReturnType: The declared return type 'list<Psalm\Type\Atomic>' for Psalm\Internal\Type\TemplateStandinTypeReplacer::handleAtomicStandin is more specific than the inferred return type 'array<int<0, max>|string, Psalm\Type\Atomic>' (see https://psalm.dev/070)
LessSpecificReturnStatement: src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php#L353
src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php:353:28: LessSpecificReturnStatement: The type 'non-empty-array<string, Psalm\Type\Atomic>' is more general than the declared return type 'list<Psalm\Type\Atomic>' for Psalm\Internal\Type\TemplateStandinTypeReplacer::handleAtomicStandin (see https://psalm.dev/129)
PossiblyNullReference: src/Psalm/Internal/Type/TypeExpander.php#L1136
src/Psalm/Internal/Type/TypeExpander.php:1136:47: PossiblyNullReference: Cannot call method getAtomicTypes on possibly null value (see https://psalm.dev/083)