Completed
Push — master ( 72ab76...096673 )
by Stéphane
11:37
created

Field::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php namespace Rocket\Entities;
2
3
use Illuminate\Database\Eloquent\Model;
4
5
class Field extends Model
6
{
7 18
    public function __construct(array $attributes = [])
8
    {
9 18
        $this->bootIfNotBooted();
10
11 18
        $this->syncOriginal();
12
13
        //TODO :: validators
14 18
    }
15
16 6
    public function toArray()
17
    {
18 6
        return $this->getAttribute('value');
19
    }
20
}
21