Union vs. Intersection type in auto generated type hints

Hi there,

when writing a test, a mock will be annotated as following

/**

*@var MockObject|RealClass $someMock

*/

 

So it is using the "union" type style. With the psr5-draft the intersection type is introduced for this scenario.

/**

*@var MockObject & RealClass $someMock 

*/



Is it possible to configure this behaviour already? Some static analyzers like phpstan or psalm are already checking this style.

 

Best

Marcus

0

No, it's not possible to configure it currently. It would be great if you could submit this to our tracker at https://youtrack.jetbrains.com/newIssue, see related report https://youtrack.jetbrains.com/issue/WI-39419

0

请先登录再写评论。