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