Skip to content

Commit bd9efb7

Browse files
committed
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

+3-3
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')), new AccessoryArrayListType()),
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')), new AccessoryArrayListType());
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)), new AccessoryArrayListType());
5555
}
5656

5757
}

0 commit comments

Comments
 (0)