| 1 | <?php |
||
| 21 | class NameEntityTest extends UnitTestCase |
||
| 22 | { |
||
| 23 | //<editor-fold desc="Public Methods"> |
||
| 24 | /** |
||
| 25 | * @covers \Tfboe\FmLib\Entity\Helpers\NameEntity::getName |
||
| 26 | * @covers \Tfboe\FmLib\Entity\Helpers\NameEntity::setName |
||
| 27 | */ |
||
| 28 | public function testName() |
||
| 34 | //</editor-fold desc="Public Methods"> |
||
| 35 | |||
| 36 | //<editor-fold desc="Private Methods"> |
||
| 37 | /** |
||
| 38 | * @return MockObject|NameEntity |
||
| 39 | */ |
||
| 40 | private function mock(): MockObject |
||
| 44 | //</editor-fold desc="Private Methods"> |
||
| 45 | } |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: