| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | 2 | private function buildRegex(array $versions): array |
|
| 50 | { |
||
| 51 | $groups = []; |
||
| 52 | 2 | ||
| 53 | foreach ($versions as $package => $version) { |
||
| 54 | [$prefix, $bundle] = explode('/', $package); |
||
| 55 | $groups[sprintf('(?i:%s)(?|', $prefix)][] = sprintf('/?(?i:%s) (*MARK:%s)|', $bundle, $version); |
||
| 56 | } |
||
| 57 | |||
| 58 | return $groups; |
||
| 59 | } |
||
| 61 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: