| Conditions | 4 |
| Paths | 8 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 48 | private function handleValue(string $value): string |
|
| 20 | { |
||
| 21 | 48 | if (preg_match('/#+/', $value)) { |
|
| 22 | 6 | $this->quote = '"'; |
|
| 23 | } |
||
| 24 | 48 | if (preg_match('/^["\']+/', $value)) { |
|
| 25 | 24 | $this->quote = null; |
|
| 26 | } |
||
| 27 | 48 | return $this->quote ? sprintf('%2$s%1$s%2$s', $value, $this->quote) : $value; |
|
| 28 | } |
||
| 41 |