Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Account extends BaseApi |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @return AccountModel|null |
||
14 | */ |
||
15 | public function get() |
||
16 | { |
||
17 | $response = $this->browser->get('/account'); |
||
18 | if (!$response->isSuccessful()) { |
||
19 | $this->registerLastError($response); |
||
20 | |||
21 | return null; |
||
22 | } |
||
23 | |||
24 | return $this->unmarshal($response); |
||
25 | } |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @param array $data |
||
30 | * @return AccountModel |
||
31 | * @throws Exception |
||
32 | */ |
||
33 | protected function cast(array $data) |
||
46 | } |
||
47 | } |
||
48 |