Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 4 | private function quoteKey(string $key): string |
|
20 | { |
||
21 | 4 | return strpos($key, DataContainerInterface::SEPARATOR) !== false |
|
22 | 2 | ? sprintf( |
|
23 | 2 | '%s%s%s', |
|
24 | 2 | DataContainerInterface::ENCLOSURE, |
|
25 | 2 | str_replace( |
|
26 | 2 | DataContainerInterface::ENCLOSURE, |
|
27 | 2 | DataContainerInterface::ENCLOSURE . DataContainerInterface::ENCLOSURE, |
|
28 | 2 | $key |
|
29 | ), |
||
30 | 2 | DataContainerInterface::ENCLOSURE |
|
31 | ) |
||
32 | 4 | : $key; |
|
33 | } |
||
35 |