Skip to content

Commit 56eadce

Browse files
committed
MethodSignatureRule - more verbose type description
1 parent db656b0 commit 56eadce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Rules/Methods/MethodSignatureRule.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ public function processNode(Node $node, Scope $scope): array
7272
if ($returnTypeCompatibility->no() || (!$returnTypeCompatibility->yes() && $this->reportMaybes)) {
7373
$errors[] = RuleErrorBuilder::message(sprintf(
7474
'Return type (%s) of method %s::%s() should be %s with return type (%s) of method %s::%s()',
75-
$parameters->getReturnType()->describe(VerbosityLevel::typeOnly()),
75+
$parameters->getReturnType()->describe(VerbosityLevel::value()),
7676
$method->getDeclaringClass()->getDisplayName(),
7777
$method->getName(),
7878
$returnTypeCompatibility->no() ? 'compatible' : 'covariant',
79-
$parentParameters->getReturnType()->describe(VerbosityLevel::typeOnly()),
79+
$parentParameters->getReturnType()->describe(VerbosityLevel::value()),
8080
$parentMethod->getDeclaringClass()->getDisplayName(),
8181
$parentMethod->getName()
8282
))->build();
@@ -96,12 +96,12 @@ public function processNode(Node $node, Scope $scope): array
9696
'Parameter #%d $%s (%s) of method %s::%s() should be %s with parameter $%s (%s) of method %s::%s()',
9797
$parameterIndex + 1,
9898
$parameter->getName(),
99-
$parameter->getType()->describe(VerbosityLevel::typeOnly()),
99+
$parameter->getType()->describe(VerbosityLevel::value()),
100100
$method->getDeclaringClass()->getDisplayName(),
101101
$method->getName(),
102102
$parameterResult->no() ? 'compatible' : 'contravariant',
103103
$parentParameter->getName(),
104-
$parentParameter->getType()->describe(VerbosityLevel::typeOnly()),
104+
$parentParameter->getType()->describe(VerbosityLevel::value()),
105105
$parentMethod->getDeclaringClass()->getDisplayName(),
106106
$parentMethod->getName()
107107
))->build();

0 commit comments

Comments
 (0)