feature: Parse parenthesized & conditional phpdoc type#6796
feature: Parse parenthesized & conditional phpdoc type#6796Wirone merged 1 commit intoPHP-CS-Fixer:masterfrom
Conversation
31aca7e to
8e6d624
Compare
21d1ee5 to
f308e95
Compare
Wirone
left a comment
There was a problem hiding this comment.
TypeExpressionTest provides cases only for union types. Shouldn't it provide cases also for intersection and DNF types?
As the PR name says, and the impl. as well, union/intersect is untouched. But feel free to send a PR against my PR branch. |
I know PR is about parsing parenthesized & conditional phpdoc type, but since DNF types use parenthesis, I believe your test cases should cover it to prove it works as it should 😉. |
|
@Wirone I added a test for intersect |
|
@mvorisek that's 1/2 of what I asked 😉. I really would like to see test case with DNF types, like |
|
@Wirone please submit a PR into https://github.com/mvorisek/PHP-CS-Fixer/tree/parse_conditional_phpdoc |
d94237a to
04e4237
Compare
|
DFN test added |
Wirone
left a comment
There was a problem hiding this comment.
I have only one thing to consider, but it's a minor change (not a blocker).
04e4237 to
c5cbfd6
Compare
|
Thank you, @mvorisek 🍻 |
fix #6568
based on @VincentLanglet #6568 (comment), thank you!
and https://github.com/phpstan/phpdoc-parser/blob/1.9.x/doc/grammars/type.abnf grammar used by phpstan