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

Field::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 8
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
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