|
11 | 11 | use PHPStan\Type\Constant\ConstantBooleanType;
|
12 | 12 | use PHPStan\Type\Constant\ConstantIntegerType;
|
13 | 13 | use PHPStan\Type\IntegerType;
|
| 14 | +use PHPStan\Type\MixedType; |
14 | 15 | use PHPStan\Type\NullType;
|
15 | 16 | use PHPStan\Type\ObjectType;
|
16 | 17 | use PHPStan\Type\StringType;
|
@@ -76,8 +77,8 @@ public function processNode(Node $node, Scope $scope): array
|
76 | 77 | }
|
77 | 78 |
|
78 | 79 | // is array
|
79 | | - if (($mode & 8) === 8 && !(new UnionType([new ArrayType(new IntegerType(), new StringType()), new NullType()]))->isSuperTypeOf($defaultType)->yes()) { |
80 | | - return [sprintf('Parameter #5 $default of method Symfony\Component\Console\Command\Command::addOption() expects array<int, string>|null, %s given.', $defaultType->describe(VerbosityLevel::typeOnly()))]; |
| 80 | + if (($mode & 8) === 8 && !(new UnionType([new ArrayType(new MixedType(), new StringType()), new NullType()]))->isSuperTypeOf($defaultType)->yes()) { |
| 81 | + return [sprintf('Parameter #5 $default of method Symfony\Component\Console\Command\Command::addOption() expects array<string>|null, %s given.', $defaultType->describe(VerbosityLevel::typeOnly()))]; |
81 | 82 | }
|
82 | 83 |
|
83 | 84 | return [];
|
|
0 commit comments