@@ -12,40 +12,40 @@ trait RouteCollectionTrait
12
12
abstract public function map (
13
13
string |array $ method ,
14
14
string $ path ,
15
- string | callable |RequestHandlerInterface $ handler
15
+ callable | array | string |RequestHandlerInterface $ handler
16
16
): Route ;
17
17
18
- public function delete (string $ path , string |callable $ handler ): Route
18
+ public function delete (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
19
19
{
20
20
return $ this ->map (Request::METHOD_DELETE , $ path , $ handler );
21
21
}
22
22
23
- public function get (string $ path , string |callable $ handler ): Route
23
+ public function get (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
24
24
{
25
25
return $ this ->map (Request::METHOD_GET , $ path , $ handler );
26
26
}
27
27
28
- public function head (string $ path , string |callable $ handler ): Route
28
+ public function head (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
29
29
{
30
30
return $ this ->map (Request::METHOD_HEAD , $ path , $ handler );
31
31
}
32
32
33
- public function options (string $ path , string |callable $ handler ): Route
33
+ public function options (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
34
34
{
35
35
return $ this ->map (Request::METHOD_OPTIONS , $ path , $ handler );
36
36
}
37
37
38
- public function patch (string $ path , string |callable $ handler ): Route
38
+ public function patch (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
39
39
{
40
40
return $ this ->map (Request::METHOD_PATCH , $ path , $ handler );
41
41
}
42
42
43
- public function post (string $ path , string |callable $ handler ): Route
43
+ public function post (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
44
44
{
45
45
return $ this ->map (Request::METHOD_POST , $ path , $ handler );
46
46
}
47
47
48
- public function put (string $ path , string |callable $ handler ): Route
48
+ public function put (string $ path , callable | array | string |RequestHandlerInterface $ handler ): Route
49
49
{
50
50
return $ this ->map (Request::METHOD_PUT , $ path , $ handler );
51
51
}
0 commit comments