Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
43 | private function buildRegex($versions): array |
||
44 | { |
||
45 | $groups = []; |
||
46 | |||
47 | foreach ($versions as $package => $version) { |
||
48 | [$prefix, $bundle] = explode('/', $package); |
||
49 | $groups[sprintf('(?i:%s)(?|', $prefix)][] = sprintf('/?(?i:%s) (*MARK:%s)|', $bundle, $version); |
||
50 | } |
||
51 | |||
52 | return $groups; |
||
53 | } |
||
55 |