| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function resolveClassNames(string $namespace): string |
||
| 34 | { |
||
| 35 | $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function (array $matches) { |
||
| 36 | return str_replace(':', ':\\', $matches[0]); |
||
| 37 | }, $this->expression); |
||
| 38 | $expression = preg_replace('/(?<!:):(?=([a-zA-Z_][a-zA-Z0-9_]*))/', "$namespace\\", $expression); |
||
| 39 | $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function (array $matches) { |
||
| 40 | return str_replace(':\\', ':', $matches[0]); |
||
| 41 | }, $expression); |
||
| 42 | return $expression; |
||
| 43 | } |
||
| 44 | } |