| 1 | <?php |
||
| 8 | trait HookCopierTrait |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var HookCopier |
||
| 12 | */ |
||
| 13 | private $hookCopier; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return \Mockery\MockInterface|HookCopier |
||
| 17 | */ |
||
| 18 | protected function getHookCopier() |
||
| 22 | |||
| 23 | protected function shouldCopyPreCommitHook() |
||
| 29 | |||
| 30 | protected function shouldCopyCommitMsgHook() |
||
| 36 | |||
| 37 | protected function shouldCopyPrePushHook() |
||
| 43 | } |
||
| 44 |
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: