-
Notifications
You must be signed in to change notification settings - Fork 105
Method test::getItems() with return type void returns *NEVER* but should not return anything. #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
1) phpDoc @return test[]&Collection&Selectable definitely doesn’t make
sense and gets interpreted as NeverType - you should use something like
iterable<test>&Collection&Selectable, try that out.
2) I have no idea why it thinks the method has void return type.
Try to fix the phpDocs and we’ll see what’s next.
On Wed, 27 Jun 2018 at 20:29, Arnaud Le Blanc ***@***.***> wrote:
When the doctrine plugin is enabled, I get an error with when analysing
this code in level 7:
<?phpuse Doctrine\Common\Collections\Collection;use Doctrine\Common\Collections\Selectable;class test{ /** * @var test[]&Collection&Selectable */ private $items; /** * @return test[]&Collection&Selectable */ public function getItems(): Collection { return $this->items; }}
The error:
Method test::getItems() with return type void returns *NEVER* but should not return anything.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAGZuMmkElDIdGLgsxR1veoQriYtHcyBks5uA870gaJpZM4U6LX0>
.
--
Ondřej Mirtes
|
Thanks, this fixes the problem. It seems that phpstan 0.9 was handling test[] like iterable. Also, I though it was related to this plugin, but it's not :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When the doctrine plugin is enabled, I get an error with when analysing this code in level 7:
The error:
The text was updated successfully, but these errors were encountered: