| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | protected function match($pattern, $callback): void |
||
| 19 | { |
||
| 20 | if (preg_match_all($pattern, self::getContent(), $matches, PREG_SET_ORDER)) { |
||
| 21 | foreach ($matches as $match) { |
||
| 22 | |||
| 23 | $this->search = $match[0]; |
||
| 24 | |||
| 25 | unset($match[0]); |
||
| 26 | |||
| 27 | call_user_func_array($callback, array_filter($match)); |
||
| 28 | } |
||
| 47 |