Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Stevenmaguire\Yelp; |
||
5 | public static function makeWith(array $options = array(), $version = null) |
||
6 | { |
||
7 | if (is_null($version)) { |
||
8 | $version = Version::TWO; |
||
9 | } |
||
10 | |||
11 | switch ($version) { |
||
12 | case Version::TWO: |
||
13 | return new v2\Client($options); |
||
14 | case Version::THREE: |
||
15 | return new v3\Client($options); |
||
16 | default: |
||
17 | throw new Exception\InvalidVersionException; |
||
18 | } |
||
19 | } |
||
20 | } |
||
21 |