DependentRelationship   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
createRelated() 0 1 ?
1
<?php namespace AdamWathan\Faktory\Relationship;
2
3
abstract class DependentRelationship extends Relationship
4
{
5
    public function create($instance)
6
    {
7
        $this->attributes[$this->getForeignKey()] = $instance->getKey();
8
        return $this->createRelated();
9
    }
10
11
    abstract protected function createRelated();
12
}
13