[TwitchApiBridge] code simplification

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-29 23:34:29 +02:00
parent f79d699a59
commit fa294e2b4c

View file

@ -39,11 +39,9 @@ class TwitchApiBridge extends BridgeAbstract{
$context = stream_context_create($opts);
if(!$this->getInput('limit') ||
empty($this->getInput('limit'))){
$limit = $this->getInput('limit');
if(!$limit){
$limit = TWITCH_LIMIT;
}else{
$limit = (int)$this->getInput('limit');
}
// The Twitch API allows a limit between 1 .. 100. Therefore any value below must be set to 1, any greater must result in multiple requests.