| Conditions | 4 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public static function getPort($portName, array $service) |
||
| 34 | { |
||
| 35 | if ($portName && isset($service[$portName])) { |
||
| 36 | return $service[$portName]; |
||
| 37 | } elseif ($portName) { |
||
| 38 | throw new PortNotFoundException("The port named $portName can not be found"); |
||
| 39 | } else { |
||
| 40 | return reset($service); |
||
| 41 | } |
||
| 45 |