Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bd9efb7

Browse files
Fixes after PHPStan update
1 parent 23a776d commit bd9efb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/Type/Symfony/EnvelopeReturnTypeExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ public function getTypeFromMethodCall(
3737
if (count($methodCall->getArgs()) === 0) {
3838
return new ArrayType(
3939
new GenericClassStringType(new ObjectType('Symfony\Component\Messenger\Stamp\StampInterface')),
40-
AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new ObjectType('Symfony\Component\Messenger\Stamp\StampInterface'))),
40+
TypeCombinator::intersect(new ArrayType(new IntegerType(), new ObjectType('Symfony\Component\Messenger\Stamp\StampInterface')), newAccessoryArrayListType()),
4141
);
4242
}
4343

4444
$argType = $scope->getType($methodCall->getArgs()[0]->value);
4545
if (count($argType->getConstantStrings()) === 0) {
46-
return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), new ObjectType('Symfony\Component\Messenger\Stamp\StampInterface')));
46+
return TypeCombinator::intersect(new ArrayType(new IntegerType(), new ObjectType('Symfony\Component\Messenger\Stamp\StampInterface')), newAccessoryArrayListType());
4747
}
4848

4949
$objectTypes = [];
5050
foreach ($argType->getConstantStrings() as $constantString) {
5151
$objectTypes[] = new ObjectType($constantString->getValue());
5252
}
5353

54-
return AccessoryArrayListType::intersectWith(new ArrayType(new IntegerType(), TypeCombinator::union(...$objectTypes)));
54+
return TypeCombinator::intersect(new ArrayType(new IntegerType(), TypeCombinator::union(...$objectTypes)), newAccessoryArrayListType());
5555
}
5656

5757
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /