diff --git a/src/Rules/Methods/MethodSignatureRule.php b/src/Rules/Methods/MethodSignatureRule.php index 91cd3052a2..5496a71b95 100644 --- a/src/Rules/Methods/MethodSignatureRule.php +++ b/src/Rules/Methods/MethodSignatureRule.php @@ -72,11 +72,11 @@ public function processNode(Node $node, Scope $scope): array if ($returnTypeCompatibility->no() || (!$returnTypeCompatibility->yes() && $this->reportMaybes)) { $errors[] = RuleErrorBuilder::message(sprintf( 'Return type (%s) of method %s::%s() should be %s with return type (%s) of method %s::%s()', - $parameters->getReturnType()->describe(VerbosityLevel::typeOnly()), + $parameters->getReturnType()->describe(VerbosityLevel::value()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $returnTypeCompatibility->no() ? 'compatible' : 'covariant', - $parentParameters->getReturnType()->describe(VerbosityLevel::typeOnly()), + $parentParameters->getReturnType()->describe(VerbosityLevel::value()), $parentMethod->getDeclaringClass()->getDisplayName(), $parentMethod->getName() ))->build(); @@ -96,12 +96,12 @@ public function processNode(Node $node, Scope $scope): array 'Parameter #%d $%s (%s) of method %s::%s() should be %s with parameter $%s (%s) of method %s::%s()', $parameterIndex + 1, $parameter->getName(), - $parameter->getType()->describe(VerbosityLevel::typeOnly()), + $parameter->getType()->describe(VerbosityLevel::value()), $method->getDeclaringClass()->getDisplayName(), $method->getName(), $parameterResult->no() ? 'compatible' : 'contravariant', $parentParameter->getName(), - $parentParameter->getType()->describe(VerbosityLevel::typeOnly()), + $parentParameter->getType()->describe(VerbosityLevel::value()), $parentMethod->getDeclaringClass()->getDisplayName(), $parentMethod->getName() ))->build();