| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | public function create(string $version, string $token): Client |
||
| 47 | { |
||
| 48 | $http = new HttpMethodsClient($this->httpClient, $this->messageFactory); |
||
| 49 | |||
| 50 | switch ($version) { |
||
| 51 | case self::V1: |
||
| 52 | return Client::createV1($http, $token); |
||
| 53 | |||
| 54 | case self::V2: |
||
| 55 | return Client::createV2($http, $token); |
||
| 56 | |||
| 57 | case self::BETA: |
||
| 58 | return Client::createBeta($http, $token); |
||
| 59 | } |
||
| 60 | |||
| 61 | throw new RuntimeException("Version '$version' is not supported."); |
||
| 62 | } |
||
| 64 |