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

ElColumn::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
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