diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-03-07 21:53:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 21:53:53 +0100 |
commit | 39ee93925b66b527c4386647001fadc898c52a2c (patch) | |
tree | b8e0548c6ba1716b6c3f2bde9f81e8f4d913eeb2 /application/api/controllers/Links.php | |
parent | a58a8856a88cefe22027d419fac2e5664fc9ba61 (diff) | |
parent | d2d4f993e1e76bc68b65c48cb18476c404c97a41 (diff) | |
download | Shaarli-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/Links.php')
-rw-r--r-- | application/api/controllers/Links.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application/api/controllers/Links.php b/application/api/controllers/Links.php index eb78dd26..3a9c0355 100644 --- a/application/api/controllers/Links.php +++ b/application/api/controllers/Links.php | |||
@@ -59,9 +59,9 @@ class Links extends ApiController | |||
59 | $limit = $request->getParam('limit'); | 59 | $limit = $request->getParam('limit'); |
60 | if (empty($limit)) { | 60 | if (empty($limit)) { |
61 | $limit = self::$DEFAULT_LIMIT; | 61 | $limit = self::$DEFAULT_LIMIT; |
62 | } else if (ctype_digit($limit)) { | 62 | } elseif (ctype_digit($limit)) { |
63 | $limit = intval($limit); | 63 | $limit = intval($limit); |
64 | } else if ($limit === 'all') { | 64 | } elseif ($limit === 'all') { |
65 | $limit = count($links); | 65 | $limit = count($links); |
66 | } else { | 66 | } else { |
67 | throw new ApiBadParametersException('Invalid limit'); | 67 | throw new ApiBadParametersException('Invalid limit'); |