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
90
90
return $ this ->allowedMethods [$ uri ];
91
91
}
92
92
93
- $ this -> allowedMethods [ $ uri ] = [];
93
+ $ allowedMethods = [];
94
94
foreach ($ this ->staticRouteMap as $ method => $ uriMap ) {
95
95
if (isset ($ uriMap [$ uri ])) {
96
- $ this -> allowedMethods [$ uri ][] = $ method ;
96
+ $ allowedMethods [$ method ] = true ;
97
97
}
98
98
}
99
99
100
100
foreach ($ this ->variableRouteData as $ method => $ routeData ) {
101
101
$ result = $ this ->dispatchVariableRoute ($ routeData , $ uri );
102
102
if ($ result [0 ] === self ::FOUND ) {
103
- $ this -> allowedMethods [$ uri ][] = $ method ;
103
+ $ allowedMethods [$ method ] = true ;
104
104
}
105
105
}
106
106
107
- return $ this ->allowedMethods [$ uri ];
107
+ return $ this ->allowedMethods [$ uri ] = array_keys ( $ allowedMethods ) ;
108
108
}
109
109
}
You can’t perform that action at this time.
0 commit comments