| 1 | <?php |
||
| 8 | trait PrePushOriginalExecutorTrait |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var PrePushOriginalExecutorInterface |
||
| 12 | */ |
||
| 13 | private $prePushOriginalExecutor; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return \Mockery\MockInterface|PrePushOriginalExecutorInterface |
||
| 17 | */ |
||
| 18 | protected function getPrePushOriginalExecutor() |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $remote |
||
| 27 | * @param string $url |
||
| 28 | * @param string|null $return |
||
| 29 | */ |
||
| 30 | protected function shouldExecutePrePushOriginal($remote, $url, $return) |
||
| 38 | } |
||
| 39 |
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: