| Conditions | 4 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 3 | public static function removeDisallowedConfigurations(array $allowedConfigurations, array $configurations): array |
|
| 25 | { |
||
| 26 | 3 | if (! empty($allowedConfigurations)) { |
|
| 27 | // remove configuration that does not match the current selection |
||
| 28 | 1 | foreach ($configurations as $confKey => $confArray) { |
|
| 29 | 1 | if (! in_array($confKey, $allowedConfigurations, true)) { |
|
| 30 | 1 | unset($configurations[$confKey]); |
|
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 | 3 | return $configurations; |
|
| 35 | } |
||
| 37 |