| Conditions | 3 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 95 | 21 | private function decoder($many, $one, callable $escaper) |
|
| 96 | { |
||
| 97 | 21 | return preg_replace_callback( |
|
| 98 | 21 | '/\\\\.|\*|\?|./', |
|
| 99 | 21 | function ($match) use ($many, $one, $escaper) { |
|
| 100 | 21 | if ($match[0] === '*') { |
|
| 101 | 6 | return $many; |
|
| 102 | 18 | } elseif ($match[0] === '?') { |
|
| 103 | 6 | return $one; |
|
| 104 | } else { |
||
| 105 | 15 | return $escaper(stripslashes($match[0])); |
|
| 106 | } |
||
| 107 | 21 | }, |
|
| 108 | 21 | $this->glob |
|
| 109 | 21 | ); |
|
| 110 | } |
||
| 111 | } |
||
| 112 |