leaphub/phpcs-symfony2-standard

Comment sniff reports missing return tag from closure return

cfoehrdes opened this issue · 1 comments

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;
        }));
}

We are also experiencing this one, would be nice to get a fix :)