1 | <?php |
||
20 | class StripOnVisibilityTest extends \Mockery\Adapter\Phpunit\MockeryTestCase |
||
21 | { |
||
22 | /** @var ProjectDescriptorBuilder|m\Mock */ |
||
23 | protected $builderMock; |
||
24 | |||
25 | /** @var StripOnVisibility $fixture */ |
||
26 | protected $fixture; |
||
27 | |||
28 | /** |
||
29 | * Creates a new (empty) fixture object. |
||
30 | */ |
||
31 | protected function setUp() |
||
36 | |||
37 | /** |
||
38 | * @covers phpDocumentor\Descriptor\Filter\StripOnVisibility::__construct |
||
39 | */ |
||
40 | public function testProjectDescriptorBuilderIsSetUponConstruction() |
||
44 | |||
45 | /** |
||
46 | * @covers phpDocumentor\Descriptor\Filter\StripOnVisibility::filter |
||
47 | */ |
||
48 | public function testStripsTagFromDescriptionIfVisibilityIsNotAllowed() |
||
57 | |||
58 | /** |
||
59 | * @covers phpDocumentor\Descriptor\Filter\StripOnVisibility::filter |
||
60 | */ |
||
61 | public function testKeepsDescriptorIfVisibilityIsAllowed() |
||
70 | |||
71 | /** |
||
72 | * @covers phpDocumentor\Descriptor\Filter\StripOnVisibility::filter |
||
73 | */ |
||
74 | public function testKeepsDescriptorIfDescriptorNotInstanceOfVisibilityInterface() |
||
82 | } |
||
83 |
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: