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