Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace StarCraftApiClient\Requests; |
||
19 | public function __construct($client, $type, $id, $name, $region) |
||
20 | { |
||
21 | $url = 'https://%s.api.battle.net/sc2/profile/%s/1/%s/%s?locale=%s&apikey=%s'; |
||
22 | |||
23 | if (in_array($type, ['ladders', 'matches'])) { |
||
24 | $this->url = |
||
25 | sprintf($url, $region, $id, $name, $type, $client->language(), $client->apiToken()); |
||
26 | } else { |
||
27 | $this->url = |
||
28 | sprintf($url, $region, $id, $name, null, $client->language(), $client->apiToken()); |
||
29 | } |
||
30 | } |
||
31 | } |
||
32 |