Method "does not specify its types: T" #4722
-
https://phpstan.org/r/cf2e0b66-6dd7-4272-a2f9-129915694e81 Building off an earlier example, I have a method on my query class that returns itself, to allow chaining, e.g. Merely changing the return value of What's the appropriate way to PHPdoc this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
With The most straightforward way is also |
Beta Was this translation helpful? Give feedback.
With
@return static
or@return $this
it's fine: https://phpstan.org/r/a6a846cd-1f8d-4ac5-a567-e02918918622The most straightforward way is also
self<T>
.