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