BelongsTo   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
A create() 0 4 1
A getRelatedModel() 0 4 1
1
<?php namespace AdamWathan\Faktory\Relationship;
2
3
class BelongsTo extends Relationship
4
{
5
    public function build()
6
    {
7
        return $this->factory->build($this->attributes);
8
    }
9
10
    public function create()
11
    {
12
        return $this->factory->create($this->attributes);
13
    }
14
15
    protected function getRelatedModel()
16
    {
17
        return $this->factory->getModel();
18
    }
19
}
20