| Conditions | 2 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 1 | protected function getCurrentlyAttachedPivots() |
|
| 15 | { |
||
| 16 | return $this->newPivotQuery()->get()->map(function ($record) { |
||
|
|
|||
| 17 | 1 | $class = $this->using ? $this->using : Pivot::class; |
|
| 18 | |||
| 19 | 1 | $pivot = $class::fromRawAttributes($this->parent, (array)$record, $this->getTable(), true); |
|
| 20 | |||
| 21 | 1 | return $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey); |
|
| 22 | 1 | }); |
|
| 25 |