Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.25 |
Changes | 0 |
1 | <?php |
||
38 | 66 | public function getClass($name = null) |
|
39 | { |
||
40 | 66 | if (is_null($name)) { |
|
41 | 66 | if (version_compare(Client::VERSION, '6.0.0', '>=')) { |
|
42 | 66 | $name = 'guzzle6'; |
|
43 | } else { |
||
44 | $name = 'guzzle5'; |
||
45 | } |
||
46 | } |
||
47 | 66 | if (isset($this->adapters[$name])) { |
|
48 | 66 | return $this->adapters[$name]; |
|
49 | } |
||
50 | |||
51 | throw new InvalidArgumentException(); |
||
52 | } |
||
53 | |||
67 |