| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class MergedRelation extends HasMany |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Get the results of the relationship. |
||
| 12 | * |
||
| 13 | * @return mixed |
||
| 14 | */ |
||
| 15 | 20 | public function getResults() |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Match the eagerly loaded results to their parents. |
||
| 28 | * |
||
| 29 | * @param array $models |
||
| 30 | * @param \Illuminate\Database\Eloquent\Collection $results |
||
| 31 | * @param string $relation |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | 4 | public function match(array $models, Collection $results, $relation) |
|
| 45 |