@@ -226,11 +226,11 @@ public function any(string $path, $handler, array $pathParams = [], array $opts
226226 }
227227
228228 /**
229- * @param array|string $methods
230- * @param string $path
229+ * @param array|string $methods
230+ * @param string $path
231231 * @param callable|string $handler
232- * @param array $pathParams
233- * @param array $opts
232+ * @param array $pathParams
233+ * @param array $opts
234234 */
235235 public function map ($ methods , string $ path , $ handler , array $ pathParams = [], array $ opts = [])
236236 {
@@ -242,9 +242,9 @@ public function map($methods, string $path, $handler, array $pathParams = [], ar
242242 /**
243243 * @param string $method
244244 * @param string $path
245- * @param $handler
246- * @param array $pathParams
247- * @param array $opts
245+ * @param $handler
246+ * @param array $pathParams
247+ * @param array $opts
248248 * @return Route
249249 */
250250 public function add (string $ method , string $ path , $ handler , array $ pathParams = [], array $ opts = []): Route
@@ -280,7 +280,7 @@ public function addRoute(Route $route): Route
280280 {
281281 $ this ->appendGroupInfo ($ route );
282282
283- $ path = $ route ->getPath ();
283+ $ path = $ route ->getPath ();
284284 $ method = $ route ->getMethod ();
285285
286286 $ this ->routeCounter ++;
@@ -310,10 +310,10 @@ public function addRoute(Route $route): Route
310310 /**
311311 * Create a route group with a common prefix.
312312 * All routes created in the passed callback will have the given group prefix prepended.
313- * @param string $prefix
313+ * @param string $prefix
314314 * @param \Closure $callback
315- * @param array $middleware
316- * @param array $opts
315+ * @param array $middleware
316+ * @param array $opts
317317 */
318318 public function group (string $ prefix , \Closure $ callback , array $ middleware = [], array $ opts = []): void
319319 {
@@ -382,9 +382,9 @@ protected function appendGroupInfo(Route $route): void
382382 */
383383 public function match (string $ path , string $ method = 'GET ' ): array
384384 {
385- $ path = RouteHelper::formatPath ($ path , $ this ->ignoreLastSlash );
385+ $ path = RouteHelper::formatPath ($ path , $ this ->ignoreLastSlash );
386386 $ method = \strtoupper ($ method );
387- $ sKey = $ method . ' ' . $ path ;
387+ $ sKey = $ method . ' ' . $ path ;
388388
389389 // is a static route path
390390 if (isset ($ this ->staticRoutes [$ sKey ])) {
@@ -445,7 +445,7 @@ protected function matchDynamicRoute(string $path, string $method): array
445445 $ fKey = $ first = '' ;
446446 if ($ pos = \strpos ($ path , '/ ' , 1 )) {
447447 $ first = \substr ($ path , 1 , $ pos - 1 );
448- $ fKey = $ method . ' ' . $ first ;
448+ $ fKey = $ method . ' ' . $ first ;
449449 }
450450
451451 // is a regular dynamic route(the first node is 1th level index key).
@@ -528,8 +528,8 @@ protected function findAllowedMethods(string $path, string $method): array
528528 /**
529529 * Runs the callback for the given request
530530 * @param DispatcherInterface|array $dispatcher
531- * @param null|string $path
532- * @param null|string $method
531+ * @param null|string $path
532+ * @param null|string $method
533533 * @return mixed
534534 * @throws \LogicException
535535 * @throws \Throwable
@@ -561,7 +561,7 @@ public function dispatch($dispatcher = null, $path = null, $method = null)
561561
562562 /**
563563 * @param string $name Route name
564- * @param array $pathVars
564+ * @param array $pathVars
565565 * @return string
566566 */
567567 public function createUri (string $ name , array $ pathVars = []): string
@@ -575,7 +575,7 @@ public function createUri(string $name, array $pathVars = []): string
575575
576576 /**
577577 * @param string $name
578- * @param Route $route
578+ * @param Route $route
579579 */
580580 public function nameRoute (string $ name , Route $ route ): void
581581 {
@@ -654,7 +654,7 @@ public function getChains(): array
654654 * <b>Traversable</b>
655655 * @since 5.0.0
656656 */
657- public function getIterator ()
657+ public function getIterator (): \ Traversable
658658 {
659659 return new \ArrayIterator ($ this ->getRoutes ());
660660 }
@@ -672,8 +672,8 @@ public function __toString(): string
672672 */
673673 public function toString (): string
674674 {
675- $ indent = ' ' ;
676- $ strings = ['#Routes Number: ' . $ this ->count ()];
675+ $ indent = ' ' ;
676+ $ strings = ['#Routes Number: ' . $ this ->count ()];
677677 $ strings [] = "\n#Static Routes: " ;
678678 /** @var Route $route */
679679 foreach ($ this ->staticRoutes as $ route ) {
0 commit comments