We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbb9959 commit f1fc769Copy full SHA for f1fc769
rules/DowngradePhp80/Reflection/DefaultParameterValueResolver.php
@@ -11,7 +11,6 @@
11
use PHPStan\Reflection\ParameterReflection;
12
use PHPStan\Type\Constant\ConstantArrayType;
13
use PHPStan\Type\Constant\ConstantBooleanType;
14
-use PHPStan\Type\ConstantType;
15
use PHPStan\Type\Type;
16
use PHPStan\Type\VerbosityLevel;
17
use Rector\Exception\ShouldNotHappenException;
@@ -41,7 +40,7 @@ private function resolveValueFromType(Type $constantType): ConstFetch | Expr
41
40
if ($constantType instanceof ConstantArrayType) {
42
$values = [];
43
foreach ($constantType->getValueTypes() as $valueType) {
44
- if (! $valueType instanceof ConstantType) {
+ if (! $valueType->isConstantValue()->yes()) {
45
throw new ShouldNotHappenException();
46
}
47
0 commit comments