| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 10 | public function getNetworkConfig(NetworkInterface $network): NetworkConfig |
|
| 41 | { |
||
| 42 | 10 | $class = get_class($network); |
|
| 43 | 10 | if (!array_key_exists($class, $this->networkConfigs)) { |
|
| 44 | 1 | throw new \InvalidArgumentException("Network not registered with GlobalHdPrefixConfig"); |
|
| 45 | } |
||
| 46 | |||
| 47 | 9 | return $this->networkConfigs[$class]; |
|
| 48 | } |
||
| 49 | } |
||
| 50 |