Completed
Push — master ( da839d...d75518 )
by wen
02:49
created

ElColumn   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 9 1
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 ElColumn extends Column implements ColumnContract, Arrayable, Jsonable, JsonSerializable
12
{
13
    protected $defaults = [
14
        'minWidth' => '100',
15
        'fixed'    => false,
16
    ];
17
18
    public function toArray()
19
    {
20
        $column = [
21
            'fixed'    => $this->getAttribute('fixed'),
22
            'minWidth' => $this->getAttribute('minWidth'),
23
        ];
24
25
        return array_merge(parent::toArray(), $column);
26
    }
27
}
28