Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
37 | private function buildRegex($packages): array |
||
38 | { |
||
39 | $groups = []; |
||
40 | |||
41 | foreach ($packages as $package => $directory) { |
||
42 | [$prefix, $bundle] = explode('/', $package); |
||
43 | $groups[sprintf('(?i:%s)(?|', $prefix)][] = sprintf('/?(?i:%s) (*MARK:%s)|', str_replace('-', '-?', $bundle), $directory); |
||
44 | } |
||
45 | |||
46 | return $groups; |
||
47 | } |
||
49 |