Multiple return types not respected if one of those return types matches the method signature
lindyhopchris opened this issue · comments
Christopher Gammie commented
Given a test with this code and docblock:
/**
* @param string $str_id
* @return AggregationInterface|MockObject
*/
private function create_aggregation(string $str_id): AggregationInterface {
$obj_mock = $this->createMock(AggregationInterface::class);
$obj_mock->method('get_id')->willReturn($str_id);
return $obj_mock;
}
The docblock checker says:
WARNING \AggregationStackTest::create_aggregation - @return Array does not match method signature (Gear4music\Search\Interfaces\AggregationInterface).