dancryer / php-docblock-checker

A simple tool for checking that your PHP classes and methods use docblocks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple return types not respected if one of those return types matches the method signature

lindyhopchris opened this issue · comments

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).