PEAR.Commenting.FunctionComment does not recognize intersect typehints
/**
* Inject a service into the container mock.
*
* Adjust `has('service')` and `get('service')` returns.
*
- * @param ContainerInterface&MockObject $container
+ * @param ContainerInterface &MockObject $container
* @param mixed $service
*/
protected function injectServiceInContainer(MockObject $container, string $serviceName, $service) : void
{
Return type is unaffected so it looks like sniff considers & to be pass-by-reference symbol of parameter name.
Quite likely it happens in other places with variable names after type declaration too, like with inline @var
PEAR.Commenting.FunctionCommentdoes not recognize intersect typehints/** * Inject a service into the container mock. * * Adjust `has('service')` and `get('service')` returns. * - * @param ContainerInterface&MockObject $container + * @param ContainerInterface &MockObject $container * @param mixed $service */ protected function injectServiceInContainer(MockObject $container, string $serviceName, $service) : void {Return type is unaffected so it looks like sniff considers & to be pass-by-reference symbol of parameter name.
Quite likely it happens in other places with variable names after type declaration too, like with inline
@var