Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
54 | 5 | public function processAliasing($content, $mode, Rewriter $rewriter) |
|
55 | { |
||
56 | 5 | if (!preg_match_all($this->pattern, $content, $matches, PREG_SET_ORDER)) { |
|
57 | // early return: if there are no matches, no need for the rest of the processing. |
||
58 | return $content; |
||
59 | } |
||
60 | 5 | $groups = []; |
|
61 | 5 | foreach ($matches as $match) { |
|
62 | 5 | $groups[$match[2]][]= $match; |
|
63 | } |
||
64 | |||
65 | 5 | return $rewriter->rewriteMatches($content, $mode, $groups); |
|
66 | } |
||
68 |