Conditions | 1 |
Paths | 1 |
Total Lines | 37 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function items() |
||
12 | { |
||
13 | return [ |
||
14 | [ |
||
15 | 'label' => Yii::t('hipanel:hosting', 'Already'), |
||
16 | 'color' => '#E0E0E0', |
||
17 | ], |
||
18 | [ |
||
19 | 'label' => Yii::t('hipanel:hosting', 'Deferred'), |
||
20 | 'color' => '#AAAAFF', |
||
21 | 'rule' => $this->model->type === 'free', |
||
|
|||
22 | ], |
||
23 | [ |
||
24 | 'label' => Yii::t('hipanel:hosting', 'New'), |
||
25 | 'color' => '#FFFF99', |
||
26 | 'rule' => $this->model->state === 'new', |
||
27 | ], |
||
28 | [ |
||
29 | 'label' => Yii::t('hipanel:hosting', 'In progress'), |
||
30 | 'color' => '#AAFFAA', |
||
31 | 'rule' => $this->model->state === 'progress', |
||
32 | ], |
||
33 | [ |
||
34 | 'label' => Yii::t('hipanel:hosting', 'Done'), |
||
35 | ], |
||
36 | [ |
||
37 | 'label' => Yii::t('hipanel:hosting', 'Error'), |
||
38 | 'color' => '#FFCCCC', |
||
39 | 'rule' => $this->model->state === 'error', |
||
40 | ], |
||
41 | [ |
||
42 | 'label' => Yii::t('hipanel:hosting', 'Buzzed'), |
||
43 | 'color' => '#FFCCCC', |
||
44 | 'rule' => $this->model->state === 'buzzed', |
||
45 | ], |
||
46 | ]; |
||
47 | } |
||
48 | } |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: