Skip to content

Commit b06e2d1

Browse files
committed
Fix return type error message
1 parent 81bb234 commit b06e2d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/Rules/TypeHints/AbstractMissingTypeHintRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private function analyzeWithTypehint(DebugContextInterface $debugContext, Type $
180180
if ($debugContext instanceof ParameterDebugContext) {
181181
return sprintf('%s type is "array". Please provide a @param annotation to further specify the type of the array. For instance: @param int[] $%s', (string) $debugContext, $debugContext->getName());
182182
} else {
183-
return sprintf('%s return type is "array". Please provide a @param annotation to further specify the type of the array. For instance: @return int[]', (string) $debugContext);
183+
return sprintf('%s return type is "array". Please provide a @return annotation to further specify the type of the array. For instance: @return int[]', (string) $debugContext);
184184
}
185185
} else {
186186
if ($docblockWithoutNullable instanceof UnionType) {

Diff for: tests/Rules/TypeHints/MissingTypeHintRuleInFunctionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testCheckCatchedException()
5555
38,
5656
],
5757
[
58-
'In function "test6", return type is "array". Please provide a @param annotation to further specify the type of the array. For instance: @return int[]',
58+
'In function "test6", return type is "array". Please provide a @return annotation to further specify the type of the array. For instance: @return int[]',
5959
38,
6060
],
6161
[

0 commit comments

Comments
 (0)