Completed
Push — master ( 481507...e81850 )
by Denis
01:52
created

RawColumn   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configTests() 0 6 1
A _renderValue() 0 4 1
1
<?php
2
3
namespace Woo\GridView\Columns;
4
5
class RawColumn extends BaseColumn
6
{
7
    /**
8
     * @var string
9
     */
10
    public $contentFormat = 'raw';
11
12
    /**
13
     * @return array
14
     */
15
    protected function configTests(): array
16
    {
17
        return array_merge(parent::configTests(), [
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
}