| Total Complexity | 1 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | trait NestedRelation |
||
| 11 | { |
||
| 12 | 4 | protected function resolveNestedRelation($property) |
|
| 13 | { |
||
| 14 | 4 | return collect(explode('.', $property)) |
|
| 15 | 4 | ->pipe( |
|
| 16 | 4 | function (Collection $parts) { |
|
| 17 | return [ |
||
| 18 | 4 | $parts->except(count($parts) - 1) |
|
| 19 | 4 | ->map(function (string $value): string { |
|
| 20 | 4 | return Str::class->camel($value); |
|
|
|
|||
| 21 | })->implode('.'), |
||
| 28 |