diff --git a/system/routing/filter.php b/system/routing/filter.php index a88468ae..8fec6d15 100644 --- a/system/routing/filter.php +++ b/system/routing/filter.php @@ -49,10 +49,7 @@ public static function call($filters, $parameters = array(), $override = false) // "Before" filters may override the request cycle. For example, an authentication // filter may redirect a user to a login view if they are not logged in. Because of // this, we will return the first filter response if overriding is enabled. - if ( ! is_null($response) and $override) - { - return $response; - } + if ( ! is_null($response) and $override) return $response; } } diff --git a/system/routing/loader.php b/system/routing/loader.php index 0cb223c9..902bdb81 100644 --- a/system/routing/loader.php +++ b/system/routing/loader.php @@ -60,9 +60,8 @@ private function load_nested_routes($segments) array_push($segments, substr($segment, 0, strpos($segment, '.'))); } - // Shift the module name off of the beginning of the array so we can locate the - // appropriate route file. Since the module name will not be part of the directory - // structure, we need to get rid of it. + // Since it is no part of the route directory structure, shift the module name off of the + // beginning of the array so we can locate the appropriate route file. if (count($segments) > 0 and ACTIVE_MODULE !== 'application') { array_shift($segments); diff --git a/system/routing/route.php b/system/routing/route.php index 358b19a4..d3dc4a01 100644 --- a/system/routing/route.php +++ b/system/routing/route.php @@ -52,10 +52,9 @@ public function call() { $response = null; - // The callback may be in array form, meaning it has attached filters or is named. - // However, the callback may also simply be a closure. If it is just a closure, - // we can execute it here. Otherwise, we will need to evaluate the route for any - // filters that need to be called. + // The callback may be in array form, meaning it has attached filters or is named and we + // will need to evaluate it further to determine what to do. If the callback is just a + // closure, we can execute it now and return the result. if (is_callable($this->callback)) { $response = call_user_func_array($this->callback, $this->parameters);