File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -90,20 +90,20 @@ public function getAllowedMethods(string $uri): array
9090 return $ this ->allowedMethods [$ uri ];
9191 }
9292
93- $ this -> allowedMethods [ $ uri ] = [];
93+ $ allowedMethods = [];
9494 foreach ($ this ->staticRouteMap as $ method => $ uriMap ) {
9595 if (isset ($ uriMap [$ uri ])) {
96- $ this -> allowedMethods [$ uri ][] = $ method ;
96+ $ allowedMethods [$ method ] = true ;
9797 }
9898 }
9999
100100 foreach ($ this ->variableRouteData as $ method => $ routeData ) {
101101 $ result = $ this ->dispatchVariableRoute ($ routeData , $ uri );
102102 if ($ result [0 ] === self ::FOUND ) {
103- $ this -> allowedMethods [$ uri ][] = $ method ;
103+ $ allowedMethods [$ method ] = true ;
104104 }
105105 }
106106
107- return $ this ->allowedMethods [$ uri ];
107+ return $ this ->allowedMethods [$ uri ] = array_keys ( $ allowedMethods ) ;
108108 }
109109}
You can’t perform that action at this time.
0 commit comments