Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | public function items() |
||
20 | { |
||
21 | return [ |
||
22 | [ |
||
23 | 'label' => Yii::t('hipanel:hosting', 'Domain'), |
||
24 | ], |
||
25 | [ |
||
26 | 'label' => Yii::t('hipanel:hosting', 'DNS records'), |
||
27 | 'color' => '#CCFFCC', |
||
28 | ], |
||
29 | [ |
||
30 | 'label' => Yii::t('hipanel:hosting', 'Alias'), |
||
31 | 'color' => '#CCCCFF', |
||
32 | 'rule' => $this->model->vhost_id !== null, |
||
|
|||
33 | ], |
||
34 | [ |
||
35 | 'label' => Yii::t('hipanel:hosting', 'Name server'), |
||
36 | 'color' => '#FFFFCC', |
||
37 | ], |
||
38 | [ |
||
39 | 'label' => Yii::t('hipanel:hosting', 'Complex domain'), |
||
40 | ], |
||
41 | ]; |
||
42 | } |
||
43 | } |
||
44 |
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: