Hi everyone,

I have posted this PR and i am sorry i could not participate in this 
discussion earlier.

@CRB, thanks for accepting the PR.

The main reason i did this PR is because PHPUnit adds some methods to a 
mock object and phpstan-phpunit seems to correctly represent the resulting 
object using the intersection operator (&).
I understand though that having a full algebraic description type may lead 
to complex syntaxes, hard to read codes and hard to create parsers.
I am all for following PHP as much as possible.
For now, Alexey's proposition will suffice to me :

> Let's allow only ONE type of operator - "|" or "&" and no braces.
>
So the following examples would be allowed :
@var null|int $foo
@var Foo&\PHPUnit\Framework\MockObject\MockObject $foo

But not :
@var null|Foo&Bar $object

I am not very familliar with the ABNF grammar, so feel free to correct me.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/6e76c1be-d793-4ce0-9d60-819045b55d18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to