From fa294e2b4c400d5360e5f9d413a0d1afd9bde96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Mon, 29 Aug 2016 23:34:29 +0200 Subject: [PATCH] [TwitchApiBridge] code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/TwitchApiBridge.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bridges/TwitchApiBridge.php b/bridges/TwitchApiBridge.php index ce31c35..becdd9f 100644 --- a/bridges/TwitchApiBridge.php +++ b/bridges/TwitchApiBridge.php @@ -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.