1 | <?php |
||
2 | |||
3 | namespace hipanel\modules\server\widgets\combo; |
||
4 | |||
5 | use hipanel\widgets\RefCombo; |
||
6 | use Yii; |
||
7 | |||
8 | class ServerStateRefCombo extends RefCombo |
||
9 | { |
||
10 | public function prepareData() |
||
11 | { |
||
12 | $refs = parent::prepareData(); |
||
13 | if (Yii::$app->user->can('ref.view.not-used')) { |
||
0 ignored issues
–
show
|
|||
14 | return $refs; |
||
15 | } |
||
16 | |||
17 | return array_filter($refs, function ($k) { |
||
18 | return in_array($k, ['setuping', 'error', 'ok']); |
||
19 | }, ARRAY_FILTER_USE_KEY); |
||
20 | } |
||
21 | } |
||
22 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.