diff --git a/src/Aviat/AnimeClient/Model.php b/src/Aviat/AnimeClient/Model.php index 877a4add..e059ff7a 100644 --- a/src/Aviat/AnimeClient/Model.php +++ b/src/Aviat/AnimeClient/Model.php @@ -62,7 +62,10 @@ class Model { } // Failsafe for weird urls - if (strlen($ext) > 3) return $api_path; + if (strlen($ext) > 3) + { + return $api_path; + } $img_cache_path = $this->config->get('img_cache_path'); $cached_image = "{$series_slug}.{$ext}"; diff --git a/src/Aviat/AnimeClient/RoutingBase.php b/src/Aviat/AnimeClient/RoutingBase.php index 0d8aa4ea..9674bb5c 100644 --- a/src/Aviat/AnimeClient/RoutingBase.php +++ b/src/Aviat/AnimeClient/RoutingBase.php @@ -85,9 +85,7 @@ class RoutingBase { public function segments() { $path = $this->path(); - $segments = explode('/', $path); - - return $segments; + return explode('/', $path); } /** diff --git a/src/Aviat/AnimeClient/UrlGenerator.php b/src/Aviat/AnimeClient/UrlGenerator.php index b2e0806d..4bb3225a 100644 --- a/src/Aviat/AnimeClient/UrlGenerator.php +++ b/src/Aviat/AnimeClient/UrlGenerator.php @@ -128,7 +128,10 @@ class UrlGenerator extends RoutingBase { if ($path === '') { $path .= trim($config_default_route, '/'); - if ($this->__get('default_to_list_view')) $path .= '/list'; + if ($this->__get('default_to_list_view')) + { + $path .= '/list'; + } } return $this->url($path); diff --git a/src/Aviat/Ion/Friend.php b/src/Aviat/Ion/Friend.php index 6651910d..4ab44d4f 100644 --- a/src/Aviat/Ion/Friend.php +++ b/src/Aviat/Ion/Friend.php @@ -110,7 +110,10 @@ class Friend { } // Return NULL on any exception, so no further logic needed // in the catch block - catch (\Exception $e) {} + catch (\Exception $e) + { + return NULL; + } return NULL; } diff --git a/src/Aviat/Ion/Type/ArrayType.php b/src/Aviat/Ion/Type/ArrayType.php index 71dadabf..d03ecb2b 100644 --- a/src/Aviat/Ion/Type/ArrayType.php +++ b/src/Aviat/Ion/Type/ArrayType.php @@ -205,8 +205,7 @@ class ArrayType { { if (empty($pos) || ! is_array($pos)) { - $pos = NULL; - return $pos; + return NULL; } $pos =& $pos[$level]; }