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

Field   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A toArray() 0 4 1
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