55use DoctrineIntersectionTypeIsSupertypeOf \Collection ;
66use Iterator ;
77use ObjectTypeEnums \FooEnum ;
8+ use PHPStan \DependencyInjection \BleedingEdgeToggle ;
89use PHPStan \Testing \PHPStanTestCase ;
910use PHPStan \TrinaryLogic ;
1011use PHPStan \Type \Accessory \AccessoryArrayListType ;
@@ -132,20 +133,20 @@ public static function dataIsAcceptedBy(): Iterator
132133 // array&callable isAcceptedBy constantArray{stdClass, string} - maybe
133134 yield [
134135 new IntersectionType ([new ArrayType (new MixedType (), new MixedType ()), new CallableType ()]),
135- new ConstantArrayType (
136+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
136137 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
137138 [new UnionType ([new ObjectType ('stdClass ' ), new StringType ()]), new StringType ()],
138- ),
139+ )) ,
139140 TrinaryLogic ::createMaybe (),
140141 ];
141142
142143 // array&callable isAcceptedBy constantArray{string, string} - maybe
143144 yield [
144145 new IntersectionType ([new ArrayType (new MixedType (), new MixedType ()), new CallableType ()]),
145- new ConstantArrayType (
146+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
146147 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
147148 [new StringType (), new StringType ()],
148- ),
149+ )) ,
149150 TrinaryLogic ::createMaybe (),
150151 ];
151152
@@ -189,10 +190,10 @@ public static function dataIsAcceptedBy(): Iterator
189190 new NonEmptyArrayType (),
190191 new HasOffsetValueType (new ConstantIntegerType (0 ), new IntegerType ()),
191192 ]),
192- new ConstantArrayType (
193+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
193194 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
194195 [new IntegerType (), new IntegerType ()],
195- ),
196+ )) ,
196197 TrinaryLogic ::createMaybe (),
197198 ];
198199
@@ -203,10 +204,10 @@ public static function dataIsAcceptedBy(): Iterator
203204 new NonEmptyArrayType (),
204205 new HasOffsetValueType (new ConstantIntegerType (0 ), new IntegerType ()),
205206 ]),
206- new ConstantArrayType (
207+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
207208 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
208209 [new StringType (), new StringType ()],
209- ),
210+ )) ,
210211 TrinaryLogic ::createNo (),
211212 ];
212213
0 commit comments