| 1 | <?php |
||
| 10 | class FinalStaticUsage implements AnalyzerPassInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param Expr\StaticCall $expr |
||
| 14 | * @param Context $context |
||
| 15 | * @return bool |
||
| 16 | */ |
||
| 17 | 1 | public function pass(Expr\StaticCall $expr, Context $context) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | 1 | public function getRegister() |
|
| 46 | } |
||
| 47 |
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: