From: Matthias Schmidt Date: Mon, 26 Dec 2011 14:29:12 +0000 (+0100) Subject: Fixes typo and enhances code and comments X-Git-Tag: 2.0.0_Beta_1~1464^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3df0984215c410cc3278a9d9ea06bfa355bbba70;p=GitHub%2FWoltLab%2FWCF.git Fixes typo and enhances code and comments --- 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; }