|
4 | 4 |
|
5 | 5 | use PHPStan\TrinaryLogic; |
6 | 6 | use PHPStan\Type\Constant\ConstantArrayType; |
| 7 | +use PHPStan\Type\Constant\ConstantBooleanType; |
| 8 | +use PHPStan\Type\Constant\ConstantFloatType; |
7 | 9 | use PHPStan\Type\Constant\ConstantIntegerType; |
| 10 | +use PHPStan\Type\Constant\ConstantStringType; |
8 | 11 | use PHPStan\Type\Generic\TemplateTypeFactory; |
9 | 12 | use PHPStan\Type\Generic\TemplateTypeScope; |
10 | 13 | use PHPStan\Type\Generic\TemplateTypeVariance; |
@@ -50,6 +53,23 @@ public function dataIsSuperTypeOf(): array |
50 | 53 | new ConstantArrayType([], []), |
51 | 54 | TrinaryLogic::createYes(), |
52 | 55 | ], |
| 56 | + [ |
| 57 | + new ArrayType(new MixedType(), new MixedType(false, new UnionType([ |
| 58 | + new NullType(), |
| 59 | + new ConstantBooleanType(false), |
| 60 | + new ConstantIntegerType(0), |
| 61 | + new ConstantFloatType(0.0), |
| 62 | + new ConstantStringType(''), |
| 63 | + new ConstantArrayType([], []), |
| 64 | + ]))), |
| 65 | + new ConstantArrayType([], []), |
| 66 | + TrinaryLogic::createYes(), |
| 67 | + ], |
| 68 | + [ |
| 69 | + new ArrayType(new MixedType(), new MixedType(false, new NullType())), |
| 70 | + new ConstantArrayType([], []), |
| 71 | + TrinaryLogic::createYes(), |
| 72 | + ], |
53 | 73 | ]; |
54 | 74 | } |
55 | 75 |
|
|
0 commit comments