@@ -37,21 +37,21 @@ public function getTypeFromMethodCall(
37
37
if (count ($ methodCall ->getArgs ()) === 0 ) {
38
38
return new ArrayType (
39
39
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 ( )),
41
41
);
42
42
}
43
43
44
44
$ argType = $ scope ->getType ($ methodCall ->getArgs ()[0 ]->value );
45
45
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 ( ));
47
47
}
48
48
49
49
$ objectTypes = [];
50
50
foreach ($ argType ->getConstantStrings () as $ constantString ) {
51
51
$ objectTypes [] = new ObjectType ($ constantString ->getValue ());
52
52
}
53
53
54
- return AccessoryArrayListType:: intersectWith (new ArrayType (new IntegerType (), TypeCombinator::union (...$ objectTypes )));
54
+ return TypeCombinator:: intersect (new ArrayType (new IntegerType (), TypeCombinator::union (...$ objectTypes )), new AccessoryArrayListType ( ));
55
55
}
56
56
57
57
}
0 commit comments