Skip to content

Commit abd18bf

Browse files
committed
fix constant type on DowngradeNamedArgumentRector
1 parent 30fb2c7 commit abd18bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/DowngradePhp80/Reflection/DefaultParameterValueResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ public function resolveFromParameterReflection(ParameterReflection $parameterRef
2525
return null;
2626
}
2727

28-
if (! $defaultValueType instanceof ConstantType) {
28+
if (! $defaultValueType->isConstantValue()->yes()) {
2929
throw new ShouldNotHappenException();
3030
}
3131

3232
return $this->resolveValueFromType($defaultValueType);
3333
}
3434

35-
private function resolveValueFromType(ConstantType $constantType): ConstFetch | Expr
35+
private function resolveValueFromType(Type $constantType): ConstFetch | Expr
3636
{
3737
if ($constantType instanceof ConstantBooleanType) {
3838
return $this->resolveConstantBooleanType($constantType);

0 commit comments

Comments
 (0)