Completed
Push — master ( e3c979...2e24d6 )
by Dmitry
08:02
created

CheckCircle::run()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 1
nop 0
crap 6
1
<?php
2
3
namespace hipanel\modules\domain\widgets;
4
5
use yii\base\Widget;
6
use yii\helpers\Html;
7
8
class CheckCircle extends Widget
9
{
10
    /**
11
     * @var boolean
12
     */
13
    public $value;
14
15
    public function run()
16
    {
17
        return Html::tag('i', null, [
18
            'class' => 'fa fa-fw fa-lg fa-check-circle pull-right',
19
            'style' =>  'color: #' . (boolval($this->value) ? '00a65a' : 'b3b3b3')
20
        ]);
21
    }
22
}
23