| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public static function parseMux(SubscriptionStatus $subscriptionStatus, array $availableMuxes) |
||
| 25 | { |
||
| 26 | $service = $subscriptionStatus->service; |
||
| 27 | |||
| 28 | // Check if the service string contains /$mux/ |
||
| 29 | foreach ($availableMuxes as $mux) |
||
| 30 | { |
||
| 31 | if (strpos($service, '/' . $mux->name . '/') !== false) |
||
| 32 | { |
||
| 33 | return $mux->name; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return null; |
||
| 38 | } |
||
| 63 |