From 3df0984215c410cc3278a9d9ea06bfa355bbba70 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 26 Dec 2011 15:29:12 +0100 Subject: [PATCH] Fixes typo and enhances code and comments --- .../files/lib/system/request/Route.class.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index 40a7de1b13..b53b05f8e5 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -17,7 +17,7 @@ use wcf\system\exception\SystemException; */ class Route { /** - * controller for route if controller is no part of the route schema + * route controller if controller is no part of the route schema * @var string */ protected $controller = null; @@ -64,7 +64,7 @@ class Route { } /** - * Sets route schema, e.g. /{controller}/{id} + * Sets route schema, e.g. /{controller}/{id}. * * @param string $routeSchema * @param string $controller @@ -87,11 +87,10 @@ class Route { $part = str_replace(array('{', '}'), '', $part); if ($part == 'controller') { if ($this->controller !== null) { - throw new SystemExyception('Controller may not be part of the scheme if a route controller is given.'); - } - else { - $hasController = true; + throw new SystemException('Controller may not be part of the scheme if a route controller is given.'); } + + $hasController = true; } } @@ -169,7 +168,7 @@ class Route { $this->routeData = $data; - // adds route's controller if necessary + // adds route controller if given if ($this->controller !== null) { $this->routeData['controller'] = $this->controller; } -- 2.20.1