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

Support newlines in array shape and generic array union types? #1488

Open
TysonAndre opened this issue Feb 21, 2018 · 2 comments · May be fixed by #4833
Open

Support newlines in array shape and generic array union types? #1488

TysonAndre opened this issue Feb 21, 2018 · 2 comments · May be fixed by #4833
Labels
enhancement This improves the quality of Phan's analysis of a codebase

Comments

@TysonAndre
Copy link
Member

TysonAndre commented Feb 21, 2018

This may require refactoring the way that union types are parsed.

Alternately, stripping out leading spaces and the first * from the doc comment and supporting newlines after { and , in union types may work

Also, @return array{key1:string, other:string}|false isn't parsing anything after array right now.

@TysonAndre TysonAndre changed the title Support multi-line array shape union types? Support spaces and newlines in array shape union types? Feb 23, 2018
@TysonAndre TysonAndre added the enhancement This improves the quality of Phan's analysis of a codebase label Feb 24, 2018
@TysonAndre TysonAndre changed the title Support spaces and newlines in array shape union types? Support spaces and newlines in array shape and generic array union types? May 7, 2019
@TysonAndre TysonAndre changed the title Support spaces and newlines in array shape and generic array union types? Support newlines in array shape and generic array union types? May 7, 2019
@ArtemGoutsoul
Copy link

+1! would be so nice to have this, since long lines often conflict with other tools (e.g. PhpStorm)

@scorgn
Copy link

scorgn commented Mar 20, 2023

PHPStorm supports this as of 2022, I think it's crucial to have support for it in Phan as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This improves the quality of Phan's analysis of a codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants