@@ -83,7 +83,7 @@ public function getCompiledRoutes(bool $forDump = false): array
8383 $ routes = $ this ->getRoutes ();
8484 }
8585
86- list ( $ staticRoutes , $ dynamicRoutes) = $ this ->groupStaticRoutes ($ routes );
86+ [ $ staticRoutes , $ dynamicRoutes] = $ this ->groupStaticRoutes ($ routes );
8787
8888 $ conditions = [null ];
8989 $ compiledRoutes [] = $ this ->compileStaticRoutes ($ staticRoutes , $ conditions );
@@ -131,7 +131,7 @@ static function (\$condition, \$context, \$request) { // \$checkCondition
131131
132132 private function generateCompiledRoutes (): string
133133 {
134- list ( $ matchHost , $ staticRoutes , $ regexpCode , $ dynamicRoutes , $ checkConditionCode) = $ this ->getCompiledRoutes (true );
134+ [ $ matchHost , $ staticRoutes , $ regexpCode , $ dynamicRoutes , $ checkConditionCode] = $ this ->getCompiledRoutes (true );
135135
136136 $ code = self ::export ($ matchHost ).', // $matchHost ' ."\n" ;
137137
@@ -186,7 +186,7 @@ private function groupStaticRoutes(RouteCollection $collection): array
186186 if ($ hasTrailingSlash ) {
187187 $ url = substr ($ url , 0 , -1 );
188188 }
189- foreach ($ dynamicRegex as list ( $ hostRx , $ rx , $ prefix) ) {
189+ foreach ($ dynamicRegex as [ $ hostRx , $ rx , $ prefix] ) {
190190 if (('' === $ prefix || 0 === strpos ($ url , $ prefix )) && (preg_match ($ rx , $ url ) || preg_match ($ rx , $ url .'/ ' )) && (!$ host || !$ hostRx || preg_match ($ hostRx , $ host ))) {
191191 $ dynamicRegex [] = [$ hostRegex , $ regex , $ staticPrefix ];
192192 $ dynamicRoutes ->add ($ name , $ route );
@@ -221,7 +221,7 @@ private function compileStaticRoutes(array $staticRoutes, array &$conditions): a
221221
222222 foreach ($ staticRoutes as $ url => $ routes ) {
223223 $ compiledRoutes [$ url ] = [];
224- foreach ($ routes as $ name => list ( $ route , $ hasTrailingSlash) ) {
224+ foreach ($ routes as $ name => [ $ route , $ hasTrailingSlash] ) {
225225 $ compiledRoutes [$ url ][] = $ this ->compileRoute ($ route , $ name , (!$ route ->compile ()->getHostVariables () ? $ route ->getHost () : $ route ->compile ()->getHostRegex ()) ?: null , $ hasTrailingSlash , false , $ conditions );
226226 }
227227 }
@@ -287,7 +287,7 @@ private function compileDynamicRoutes(RouteCollection $collection, bool $matchHo
287287 $ routes ->add ($ name , $ route );
288288 }
289289
290- foreach ($ perModifiers as list ( $ modifiers , $ routes) ) {
290+ foreach ($ perModifiers as [ $ modifiers , $ routes] ) {
291291 $ prev = false ;
292292 $ perHost = [];
293293 foreach ($ routes ->all () as $ name => $ route ) {
@@ -306,7 +306,7 @@ private function compileDynamicRoutes(RouteCollection $collection, bool $matchHo
306306 $ state ->mark += \strlen ($ rx );
307307 $ state ->regex = $ rx ;
308308
309- foreach ($ perHost as list ( $ hostRegex , $ routes) ) {
309+ foreach ($ perHost as [ $ hostRegex , $ routes] ) {
310310 if ($ matchHost ) {
311311 if ($ hostRegex ) {
312312 preg_match ('#^.\^(.*)\$.[a-zA-Z]*$# ' , $ hostRegex , $ rx );
@@ -391,7 +391,7 @@ private function compileStaticPrefixCollection(StaticPrefixCollection $tree, \st
391391 continue ;
392392 }
393393
394- list ( $ name , $ regex , $ vars , $ route , $ hasTrailingSlash , $ hasTrailingVar) = $ route ;
394+ [ $ name , $ regex , $ vars , $ route , $ hasTrailingSlash , $ hasTrailingVar] = $ route ;
395395 $ compiledRoute = $ route ->compile ();
396396 $ vars = array_merge ($ state ->hostVars , $ vars );
397397
0 commit comments