Completed
Push — master ( 6c3b36...3a7f48 )
by wen
02:41
created

IvuColumn   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 12 2
1
<?php
2
3
4
namespace Sco\Admin\Column;
5
6
use JsonSerializable;
7
use Illuminate\Contracts\Support\Arrayable;
8
use Illuminate\Contracts\Support\Jsonable;
9
use Sco\Admin\Contracts\Column\Column as ColumnContract;
10
11
class IvuColumn extends Column implements ColumnContract, Arrayable, Jsonable, JsonSerializable
12
{
13
    protected $defaults = [
14
        'fixed' => false,
15
    ];
16
17
    public function toArray()
18
    {
19
        $column = [
20
            'fixed' => $this->getAttribute('fixed')
21
        ];
22
        $render = $this->getAttribute('render');
23
        if ($render) {
24
            $column['render'] = $render;
25
        }
26
27
        return array_merge(parent::toArray(), $column);
28
    }
29
}
30