Completed
Push — master ( e27df9...80d01c )
by Andrii
48:30 queued 33:30
created

TicketGridLegend   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A items() 0 15 1
1
<?php
2
3
4
namespace hipanel\modules\ticket\grid;
5
6
7
use hipanel\modules\ticket\models\Thread;
8
use hipanel\widgets\gridLegend\BaseGridLegend;
9
use hipanel\widgets\gridLegend\GridLegendInterface;
10
use Yii;
11
12
/**
13
 * Class TicketGridLegend
14
 * @package hipanel\modules\ticket\grid
15
 *
16
 * @property Thread $model
17
 */
18
class TicketGridLegend extends BaseGridLegend implements GridLegendInterface
19
{
20
    public function items()
21
    {
22
        return [
23
            [
24
                'label' => Yii::t('hipanel:ticket', 'You assigned'),
25
                'color' => '#98FB98',
26
                'rule' => $this->model->isUserAssigned(),
27
            ],
28
            [
29
                'label' => Yii::t('hipanel:ticket', 'Priority'),
30
                'color' => '#F2DEDE',
31
                'rule' => $this->model->isHighPriority(),
32
            ],
33
        ];
34
    }
35
}
36