Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | protected function getRegExpForPattern(string $pattern) : string |
||
21 | { |
||
22 | $patternReplaced = str_replace(['*', '?'], ["\nA\n", "\nQ\n"], $pattern); |
||
23 | $patternReplaced = preg_quote($patternReplaced, '/'); |
||
24 | $patternReplaced = str_replace(["\nA\n", "\nQ\n"], ['.*', '.'], $patternReplaced); |
||
25 | |||
26 | return '/^' . $patternReplaced . '$/'; |
||
27 | } |
||
28 | } |
||
29 |