These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace hipanel\modules\hosting\grid; |
||
4 | |||
5 | use hiqdev\higrid\representations\RepresentationCollection; |
||
6 | use Yii; |
||
7 | |||
8 | View Code Duplication | class DbRepresentations extends RepresentationCollection |
|
0 ignored issues
–
show
|
|||
9 | { |
||
10 | protected function fillRepresentations() |
||
11 | { |
||
12 | $this->representations = array_filter([ |
||
13 | 'common' => [ |
||
14 | 'label' => Yii::t('hipanel', 'common'), |
||
15 | 'columns' => [ |
||
16 | 'checkbox', |
||
17 | 'name', |
||
18 | 'account', |
||
19 | 'server', |
||
20 | 'client_id', |
||
21 | 'seller_id', |
||
22 | 'description', |
||
23 | 'state', |
||
24 | ], |
||
25 | ], |
||
26 | ]); |
||
27 | } |
||
28 | } |
||
29 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.