Fixes typo and enhances code and comments
authorMatthias Schmidt <gravatronics@live.com>
Mon, 26 Dec 2011 14:29:12 +0000 (15:29 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 26 Dec 2011 14:29:12 +0000 (15:29 +0100)
wcfsetup/install/files/lib/system/request/Route.class.php

index 40a7de1b1303a9a2196d7987c4d160d9bb635698..b53b05f8e5a52c620c425994c2e12514987ef17c 100644 (file)
@@ -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;
                }