aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api/controllers/History.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-03-07 21:53:53 +0100
committerGitHub <noreply@github.com>2018-03-07 21:53:53 +0100
commit39ee93925b66b527c4386647001fadc898c52a2c (patch)
treeb8e0548c6ba1716b6c3f2bde9f81e8f4d913eeb2 /application/api/controllers/History.php
parenta58a8856a88cefe22027d419fac2e5664fc9ba61 (diff)
parentd2d4f993e1e76bc68b65c48cb18476c404c97a41 (diff)
downloadShaarli-39ee93925b66b527c4386647001fadc898c52a2c.tar.gz
Shaarli-39ee93925b66b527c4386647001fadc898c52a2c.tar.zst
Shaarli-39ee93925b66b527c4386647001fadc898c52a2c.zip
Merge pull request #1097 from ArthurHoaro/fix/psr-elseif
PSR: use elseif instead of else if
Diffstat (limited to 'application/api/controllers/History.php')
-rw-r--r--application/api/controllers/History.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/application/api/controllers/History.php b/application/api/controllers/History.php
index 2ff9deaf..5cc453bf 100644
--- a/application/api/controllers/History.php
+++ b/application/api/controllers/History.php
@@ -36,7 +36,7 @@ class History extends ApiController
36 if (empty($offset)) { 36 if (empty($offset)) {
37 $offset = 0; 37 $offset = 0;
38 } 38 }
39 else if (ctype_digit($offset)) { 39 elseif (ctype_digit($offset)) {
40 $offset = (int) $offset; 40 $offset = (int) $offset;
41 } else { 41 } else {
42 throw new ApiBadParametersException('Invalid offset'); 42 throw new ApiBadParametersException('Invalid offset');
@@ -46,7 +46,7 @@ class History extends ApiController
46 $limit = $request->getParam('limit'); 46 $limit = $request->getParam('limit');
47 if (empty($limit)) { 47 if (empty($limit)) {
48 $limit = count($history); 48 $limit = count($history);
49 } else if (ctype_digit($limit)) { 49 } elseif (ctype_digit($limit)) {
50 $limit = (int) $limit; 50 $limit = (int) $limit;
51 } else { 51 } else {
52 throw new ApiBadParametersException('Invalid limit'); 52 throw new ApiBadParametersException('Invalid limit');