DependentRelationship::createRelated()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
nc 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