Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 5 | protected function wrapLiteral(string $value): string |
|
26 | { |
||
27 | 5 | if (mb_strlen($value, 'UTF-8') === 1) { |
|
28 | 2 | return $this->escapeSingleCharacter($value); |
|
29 | } |
||
30 | |||
31 | // Wrap any other string literals in quotes, so that they're clearly defined as string literals |
||
32 | 4 | return '"' . str_replace('"', '""', $value) . '"'; |
|
33 | } |
||
45 |