Completed
Push — master ( 9fa729...e15551 )
by Dmitry
13:25
created

RefuseGridView   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 26
ccs 0
cts 21
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A columns() 0 23 2
1
<?php
2
/**
3
 * Server module for HiPanel.
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-server
6
 * @package   hipanel-module-server
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\server\grid;
12
13
use Yii;
14
15
class RefuseGridView extends \hipanel\grid\BoxedGridView
16
{
17
    protected function columns()
18
    {
19
        return array_merge(parent::columns(), [
0 ignored issues
show
Bug introduced by
The method columns() does not exist on hipanel\grid\BoxedGridView. Did you maybe mean column()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
20
            'user_comment' => [
21
                'filterAttribute' => 'user_comment_like',
22
                'value' => function ($model) {
23
                    return $model->user_comment;
24
                },
25
            ],
26
            'server' => [
27
                'label' => Yii::t('hipanel:server', 'Server'),
28
                'value' => function ($model) {
29
                    return $model->params['name'] ?: $model->params['server'];
30
                },
31
            ],
32
            'time' => [
33
                'filter' => false,
34
                'value' => function ($model) {
35
                    return Yii::$app->formatter->asDatetime($model->time);
36
                },
37
            ],
38
        ]);
39
    }
40
}
41