| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 1 | public function newPivot(array $attributes = [], $exists = false) |
|
| 22 | { |
||
| 23 | 1 | $using = $this->using; |
|
| 24 | |||
| 25 | 1 | $pivot = $using |
|
| 26 | 1 | ? $using::fromRawAttributes($this->parent, $attributes, $this->table, $exists) |
|
| 27 | 1 | : MorphPivot::fromAttributes($this->parent, $attributes, $this->table, $exists); |
|
| 28 | |||
| 29 | 1 | $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey) |
|
| 30 | 1 | ->setMorphType($this->morphType) |
|
| 31 | 1 | ->setMorphClass($this->morphClass); |
|
| 32 | |||
| 33 | 1 | return $pivot; |
|
| 34 | } |
||
| 36 |