You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 023d097
Browse filesBrowse the repository at this point in the historyBrowse files
Narrow native return types only by the native types of the returned values
A PHPDoc type is not checked at runtime: a getter of a property documented as string
that a setter assigns null to, or a value narrowed by an inline @var tag, can still be null.
The @return tags are narrowed by the PHPDoc types, the native type keeps the members
the native types of the returned values need.
Copy file name to clipboardExpand all lines: src/Rules/TooWideTypehints/OverridableMemberHelper.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ public function findOverriddenPropertyHooks(ClassReflection $classReflection, st
127
127
* @param string|null $usedMembersTip tip for the errors with %s for the used members, or void
128
128
* @param list<string> $memberDescriptions the members of the type in $usedMembersTip
129
129
* @param bool $ownOnly whether only the members the member uses itself are not reported, in an open project
130
-
* @param array{plan: Plan, startPos: int, endPos: int}|null $fix the plan of the fix of the return type, see TooWideReturnTypeFixer
130
+
* @param array{plan: Plan, nativeUsed: list<int>, startPos: int, endPos: int}|null $fix the plan of the fix of the return type, see TooWideReturnTypeFixer
131
131
*/
132
132
publicfunctionemitDeclaration(
133
133
Scope&CollectedDataEmitter$scope,
@@ -175,7 +175,7 @@ public function emitDeclaration(
0 commit comments