Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.5 |
Changes | 0 |
1 | <?php |
||
27 | 1 | public function get(Destination $destination): Gateway |
|
28 | { |
||
29 | 1 | $destinationType = $destination->destinationType(); |
|
30 | 1 | if (!isset($this->gateways[$destinationType])) { |
|
31 | new InvalidArgumentException( |
||
32 | sprintf( |
||
33 | 'No gateway for destination type (%s) is supported.', |
||
34 | $destinationType |
||
35 | ) |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | 1 | return $this->gateways[$destinationType]; |
|
40 | } |
||
41 | } |
||
42 |