Skip to content
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

Incorrect parse @return in docblock #10089

Closed
vjik opened this issue Aug 6, 2023 · 2 comments
Closed

Incorrect parse @return in docblock #10089

vjik opened this issue Aug 6, 2023 · 2 comments

Comments

@vjik
Copy link
Contributor

vjik commented Aug 6, 2023

If return description starts from {@see, then psalm add this to type. It's wrong.

https://psalm.dev/r/9e5f61f5a0

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/9e5f61f5a0
<?php

/**
 * @return bool {@see true} when random number greater than 5
 */
function go(): bool
{
    return rand(1,10) > 5;
}
Psalm output (using commit 73ebe22):

ERROR: InvalidDocblock - 6:1 - Invalid type '@seetrue' in docblock for go

@vjik vjik changed the title Incorrect parse docblock Incorrect parse @return in docblock Aug 6, 2023
@weirdan
Copy link
Collaborator

weirdan commented Feb 10, 2024

Fixed in #10326

@weirdan weirdan closed this as completed Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants