LogDataColumn   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDataCellValue() 0 6 2
1
<?php
2
namespace backend\components\grid;
3
4
use yii\grid\DataColumn;
5
use yii\helpers\Html;
6
use yii\helpers\Json;
7
use yii\helpers\VarDumper;
8
9
class LogDataColumn extends DataColumn
10
{
11
    /**
12
     * @inheritdoc
13
     */
14
    public function getDataCellValue($model, $key = null, $index = null)
15
    {
16
        $value = parent::getDataCellValue($model, $key, $index);
17
        return $value
18
            ? Html::tag('pre', VarDumper::dumpAsString(Json::decode($value)))
19
            : '&mdash;';
20
    }
21
}
22