LadderRequest::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
1
<?php namespace StarCraftApiClient\Requests;
2
3
use StarCraftApiClient\Client;
4
5
/**
6
 * @author neun
7
 * @since  2015-10-25
8
 */
9
class LadderRequest extends Request
10
{
11
    /**
12
     * LadderRequest constructor.
13
     * @param Client $client
14
     * @param int $id
15
     * @param string $region
16
     */
17
    public function __construct($client, $id, $region)
18
    {
19
        $url = 'https://%s.api.battle.net/sc2/ladder/%s?locale=%s&apikey=%s';
20
        $this->url = sprintf($url, $region, $id, $client->language(), $client->apiToken());
21
    }
22
}
23