Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

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

@lindyhopchris

Description

@lindyhopchris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions