88use Iterator ;
99use ObjectTypeEnums \FooEnum ;
1010use PHPStan \Analyser \OutOfClassScope ;
11+ use PHPStan \DependencyInjection \BleedingEdgeToggle ;
1112use PHPStan \Testing \PHPStanTestCase ;
1213use PHPStan \TrinaryLogic ;
1314use PHPStan \Type \Accessory \AccessoryArrayListType ;
@@ -142,20 +143,20 @@ public static function dataIsAcceptedBy(): Iterator
142143 // array&callable isAcceptedBy constantArray{stdClass, 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 UnionType ([new ObjectType ('stdClass ' ), new StringType ()]), new StringType ()],
148- ),
149+ )) ,
149150 TrinaryLogic ::createMaybe (),
150151 ];
151152
152153 // array&callable isAcceptedBy constantArray{string, string} - maybe
153154 yield [
154155 new IntersectionType ([new ArrayType (new MixedType (), new MixedType ()), new CallableType ()]),
155- new ConstantArrayType (
156+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
156157 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
157158 [new StringType (), new StringType ()],
158- ),
159+ )) ,
159160 TrinaryLogic ::createMaybe (),
160161 ];
161162
@@ -199,10 +200,10 @@ public static function dataIsAcceptedBy(): Iterator
199200 new NonEmptyArrayType (),
200201 new HasOffsetValueType (new ConstantIntegerType (0 ), new IntegerType ()),
201202 ]),
202- new ConstantArrayType (
203+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
203204 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
204205 [new IntegerType (), new IntegerType ()],
205- ),
206+ )) ,
206207 TrinaryLogic ::createMaybe (),
207208 ];
208209
@@ -213,10 +214,10 @@ public static function dataIsAcceptedBy(): Iterator
213214 new NonEmptyArrayType (),
214215 new HasOffsetValueType (new ConstantIntegerType (0 ), new IntegerType ()),
215216 ]),
216- new ConstantArrayType (
217+ BleedingEdgeToggle :: withBleedingEdge ( false , static fn (): ConstantArrayType => new ConstantArrayType (
217218 [new ConstantIntegerType (0 ), new ConstantIntegerType (1 )],
218219 [new StringType (), new StringType ()],
219- ),
220+ )) ,
220221 TrinaryLogic ::createNo (),
221222 ];
222223
0 commit comments