Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 5 | protected function resolveNestedRelation(string $property): array |
|
16 | { |
||
17 | 5 | return collect(explode('.', $property)) |
|
18 | 5 | ->pipe( |
|
19 | 5 | function (Collection $parts): array { |
|
20 | return [ |
||
21 | 5 | $parts->except([\count($parts) - 1]) |
|
22 | 5 | ->map(function (string $value): string { |
|
23 | 5 | return Str::camel($value); |
|
24 | 5 | })->implode('.'), |
|
25 | 5 | $parts->last(), |
|
26 | ]; |
||
31 |