Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function items() |
||
12 | { |
||
13 | return [ |
||
14 | [ |
||
15 | 'label' => Yii::t('hipanel:hosting', 'Shared'), |
||
16 | ], |
||
17 | [ |
||
18 | 'label' => Yii::t('hipanel:hosting', 'Free'), |
||
19 | 'color' => '#AAFFAA', |
||
20 | 'rule' => $this->model->type === 'free', |
||
|
|||
21 | ], |
||
22 | [ |
||
23 | 'label' => Yii::t('hipanel:hosting', 'Dedicated'), |
||
24 | 'color' => '#CCCCFF', |
||
25 | 'rule' => $this->model->type === 'dedicated', |
||
26 | ], |
||
27 | [ |
||
28 | 'label' => Yii::t('hipanel:hosting', 'System'), |
||
29 | ], |
||
30 | [ |
||
31 | 'label' => Yii::t('hipanel:hosting', 'Blocked'), |
||
32 | ], |
||
33 | ]; |
||
34 | } |
||
35 | } |
||
36 |
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: