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