Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
15 | 2 | public function GetNewsForApp($appId, $count = 5, $maxLength = null) |
|
16 | { |
||
17 | // Set up the api details |
||
18 | 2 | $this->method = __FUNCTION__; |
|
19 | 2 | $this->version = 'v0002'; |
|
20 | |||
21 | // Set up the arguments |
||
22 | $arguments = [ |
||
23 | 2 | 'appid' => $appId, |
|
24 | 2 | 'count' => $count, |
|
25 | ]; |
||
26 | |||
27 | 2 | if (! is_null($maxLength)) { |
|
28 | 1 | $arguments['maxlength'] = $maxLength; |
|
29 | } |
||
30 | |||
31 | // Get the client |
||
32 | 2 | $client = $this->setUpClient($arguments); |
|
33 | |||
34 | 2 | return $client->appnews; |
|
35 | } |
||
36 | } |
||
37 |