Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | 32 | protected function serialize(Collection $labels): string |
|
30 | { |
||
31 | 32 | if ($labels->isEmpty()) { |
|
32 | 1 | return ''; |
|
33 | } |
||
34 | |||
35 | 31 | $quoted = $labels->map(fn(string $value) => "\"{$value}\""); |
|
36 | |||
37 | 31 | $serialized = urldecode( |
|
38 | 31 | http_build_query($quoted->toArray(), '', ',') |
|
39 | ); |
||
40 | |||
41 | 31 | return "{{$serialized}}"; |
|
42 | } |
||
66 |