Comment sniff reports missing return tag from closure return
cfoehrdes opened this issue · 1 comments
cfoehrdes commented
The code comment sniff reports a missing return tag if the method has no return value but contains a closure which returns a value.
/**
* Method without return value reports missing return tag from closure
*/
public function testSomething()
{
$exampleMock = $this->getMock('\ExampleClass');
$exampleMock->expects($this->once())
->method('doSomething')
->with($this->callback(function ($argument) {
$this->assertEquals($argument, 123);
return true;
}));
}
angelsk commented
We are also experiencing this one, would be nice to get a fix :)