@@ -75,7 +75,7 @@ class Router
7575
7676 /**
7777 * Router constructor method.
78- *
78+ *
7979 * @param array $params
8080 *
8181 * @return void
@@ -105,24 +105,24 @@ function __construct(array $params = [])
105105 protected function setPaths ($ params )
106106 {
107107 if (isset ($ params ['paths ' ]) && $ paths = $ params ['paths ' ]) {
108- $ this ->paths ['controllers ' ] =
108+ $ this ->paths ['controllers ' ] =
109109 isset ($ paths ['controllers ' ])
110110 ? trim ($ paths ['controllers ' ], '/ ' )
111111 : $ this ->paths ['controllers ' ];
112112
113- $ this ->paths ['middlewares ' ] =
113+ $ this ->paths ['middlewares ' ] =
114114 isset ($ paths ['middlewares ' ])
115115 ? trim ($ paths ['middlewares ' ], '/ ' )
116116 : $ this ->paths ['middlewares ' ];
117117 }
118118
119119 if (isset ($ params ['namespaces ' ]) && $ namespaces = $ params ['namespaces ' ]) {
120- $ this ->namespaces ['controllers ' ] =
120+ $ this ->namespaces ['controllers ' ] =
121121 isset ($ namespaces ['controllers ' ])
122122 ? trim ($ namespaces ['controllers ' ], '\\' ) . '\\'
123123 : '' ;
124124
125- $ this ->namespaces ['middlewares ' ] =
125+ $ this ->namespaces ['middlewares ' ] =
126126 isset ($ namespaces ['middlewares ' ])
127127 ? trim ($ namespaces ['middlewares ' ], '\\' ) . '\\'
128128 : '' ;
@@ -197,10 +197,10 @@ public function __call($method, $params)
197197 * Add new route method one or more http methods.
198198 *
199199 * @param string $methods
200- * @param string $route
200+ * @param string $route
201201 * @param array|string|closure $settings
202202 * @param string|closure $callback
203- *
203+ *
204204 * @return void
205205 */
206206 public function add ($ methods , $ route , $ settings , $ callback = null )
@@ -228,7 +228,7 @@ public function add($methods, $route, $settings, $callback = null)
228228 *
229229 * @param string|array $pattern
230230 * @param null|string $attr
231- *
231+ *
232232 * @return void
233233 * @throws
234234 */
@@ -350,10 +350,10 @@ public function run()
350350 /**
351351 * Routes Group
352352 *
353- * @param string $name
353+ * @param string $name
354354 * @param closure|array $settings
355355 * @param null|closure $callback
356- *
356+ *
357357 * @return void
358358 */
359359 public function group ($ name , $ settings = null , $ callback = null )
@@ -376,12 +376,12 @@ public function group($name, $settings = null, $callback = null)
376376 foreach ($ this ->groups as $ key => $ value ) {
377377 if (is_array ($ value ['before ' ])) {
378378 foreach ($ value ['before ' ] as $ k => $ v ) {
379- $ list ['before ' ][] = $ v ;
379+ $ list ['before ' ][] = $ v ;
380380 }
381381 foreach ($ value ['after ' ] as $ k => $ v ) {
382- $ list ['after ' ][] = $ v ;
382+ $ list ['after ' ][] = $ v ;
383383 }
384- }
384+ }
385385 }
386386
387387 if (! is_null ($ group ['before ' ])) {
@@ -414,7 +414,7 @@ public function group($name, $settings = null, $callback = null)
414414 * @param string $route
415415 * @param string|array $settings
416416 * @param null|string $controller
417- *
417+ *
418418 * @return void
419419 * @throws
420420 */
@@ -429,7 +429,7 @@ public function controller($route, $settings, $controller = null)
429429 $ controllerFile = realpath (
430430 rtrim ($ this ->paths ['controllers ' ], '/ ' ) . '/ ' . $ controller . '.php '
431431 );
432-
432+
433433 if (! file_exists ($ controllerFile )) {
434434 return $ this ->exception ($ controller . ' class is not found! ' );
435435 }
@@ -474,7 +474,7 @@ public function controller($route, $settings, $controller = null)
474474 * Routes error function. (Closure)
475475 *
476476 * @param $callback
477- *
477+ *
478478 * @return void
479479 */
480480 public function error ($ callback )
@@ -486,10 +486,10 @@ public function error($callback)
486486 * Add new Route and it's settings
487487 *
488488 * @param $uri
489- * @param $method
489+ * @param $method
490490 * @param $callback
491491 * @param $settings
492- *
492+ *
493493 * @return void
494494 */
495495 private function addRoute ($ uri , $ method , $ callback , $ settings )
@@ -523,11 +523,11 @@ private function addRoute($uri, $method, $callback, $settings)
523523 ? $ settings ['name ' ]
524524 : null
525525 ),
526- 'before ' => (isset ($ settings ['before ' ])
526+ 'before ' => (isset ($ settings ['before ' ])
527527 ? $ settings ['before ' ]
528528 : null
529529 ),
530- 'after ' => (isset ($ settings ['after ' ])
530+ 'after ' => (isset ($ settings ['after ' ])
531531 ? $ settings ['after ' ]
532532 : null
533533 ),
@@ -556,9 +556,9 @@ private function runRouteCommand($command, $params = null)
556556 /**
557557 * Detect Routes Middleware; before or after
558558 *
559- * @param $middleware
559+ * @param $middleware
560560 * @param $type
561- *
561+ *
562562 * @return void
563563 */
564564 public function runRouteMiddleware ($ middleware , $ type )
@@ -621,7 +621,7 @@ public function getRoutes()
621621
622622 /**
623623 * Throw new Exception for Router Error
624- *
624+ *
625625 * @param $message
626626 *
627627 * @return RouterException
0 commit comments