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

Empty string '' as first option triggers Badly-formatted @param in docblock #4446

Closed
jsiefer opened this issue Oct 29, 2020 · 1 comment · Fixed by #5814
Closed

Empty string '' as first option triggers Badly-formatted @param in docblock #4446

jsiefer opened this issue Oct 29, 2020 · 1 comment · Fixed by #5814
Labels

Comments

@jsiefer
Copy link

jsiefer commented Oct 29, 2020

See https://psalm.dev/r/1fe571f7b8

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/1fe571f7b8
<?php

/**
 * @param ''|'a'|'b' $v
 */
function testBad(string $v): void {
    echo $v;
}

/**
 * @param 'a'|'b'|'' $v
 */
function testGood(string $v): void {
    echo $v;
}
Psalm output (using commit 5c784dc):

ERROR: InvalidDocblock - 6:1 - Badly-formatted @param in docblock for testBad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants