diff --git a/tests/PHPStan/Type/IntersectionTypeTest.php b/tests/PHPStan/Type/IntersectionTypeTest.php index 1d980af591..342fda5957 100644 --- a/tests/PHPStan/Type/IntersectionTypeTest.php +++ b/tests/PHPStan/Type/IntersectionTypeTest.php @@ -5,6 +5,7 @@ use DoctrineIntersectionTypeIsSupertypeOf\Collection; use Iterator; use ObjectTypeEnums\FooEnum; +use PHPStan\DependencyInjection\BleedingEdgeToggle; use PHPStan\Testing\PHPStanTestCase; use PHPStan\TrinaryLogic; use PHPStan\Type\Accessory\AccessoryArrayListType; @@ -132,20 +133,20 @@ public static function dataIsAcceptedBy(): Iterator // array&callable isAcceptedBy constantArray{stdClass, string} - maybe yield [ new IntersectionType([new ArrayType(new MixedType(), new MixedType()), new CallableType()]), - new ConstantArrayType( + BleedingEdgeToggle::withBleedingEdge(false, static fn (): ConstantArrayType => new ConstantArrayType( [new ConstantIntegerType(0), new ConstantIntegerType(1)], [new UnionType([new ObjectType('stdClass'), new StringType()]), new StringType()], - ), + )), TrinaryLogic::createMaybe(), ]; // array&callable isAcceptedBy constantArray{string, string} - maybe yield [ new IntersectionType([new ArrayType(new MixedType(), new MixedType()), new CallableType()]), - new ConstantArrayType( + BleedingEdgeToggle::withBleedingEdge(false, static fn (): ConstantArrayType => new ConstantArrayType( [new ConstantIntegerType(0), new ConstantIntegerType(1)], [new StringType(), new StringType()], - ), + )), TrinaryLogic::createMaybe(), ]; @@ -189,10 +190,10 @@ public static function dataIsAcceptedBy(): Iterator new NonEmptyArrayType(), new HasOffsetValueType(new ConstantIntegerType(0), new IntegerType()), ]), - new ConstantArrayType( + BleedingEdgeToggle::withBleedingEdge(false, static fn (): ConstantArrayType => new ConstantArrayType( [new ConstantIntegerType(0), new ConstantIntegerType(1)], [new IntegerType(), new IntegerType()], - ), + )), TrinaryLogic::createMaybe(), ]; @@ -203,10 +204,10 @@ public static function dataIsAcceptedBy(): Iterator new NonEmptyArrayType(), new HasOffsetValueType(new ConstantIntegerType(0), new IntegerType()), ]), - new ConstantArrayType( + BleedingEdgeToggle::withBleedingEdge(false, static fn (): ConstantArrayType => new ConstantArrayType( [new ConstantIntegerType(0), new ConstantIntegerType(1)], [new StringType(), new StringType()], - ), + )), TrinaryLogic::createNo(), ];