Completed
Push — master ( 9d2442...b1f272 )
by Denis
01:49
created

RawColumn   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A renderValue() 0 4 1
1
<?php
2
3
namespace Woo\GridView\Columns;
4
5
use Woo\GridView\GridViewHelper;
6
7
class RawColumn extends BaseColumn
8
{
9
    /**
10
     * RawColumn constructor.
11
     * @param array $config
12
     */
13
    public function __construct(array $config)
14
    {
15
        parent::__construct($config);
16
17
        GridViewHelper::testConfig($this, [
18
            'value' => 'closure',
19
        ]);
20
    }
21
22
    /**
23
     * @inheritdoc
24
     */
25
    public function renderValue($row)
26
    {
27
        return call_user_func($this->value, $row);
28
    }
29
}