@@ -28,7 +28,8 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $methods = ['GET']; |
| 30 | 30 | $pattern = '/hello/{first:\w+}/{last}'; |
| 31 | - $callable = function ($request, $response, $args) { |
|
| 31 | + $callable = function ($request, $response, $args) |
|
| 32 | + { |
|
| 32 | 33 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
| 33 | 34 | }; |
| 34 | 35 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -46,7 +47,8 @@ discard block |
||
| 46 | 47 | |
| 47 | 48 | $methods = ['GET']; |
| 48 | 49 | $pattern = '/hello/{first:\w+}/{last}'; |
| 49 | - $callable = function ($request, $response, $args) { |
|
| 50 | + $callable = function ($request, $response, $args) |
|
| 51 | + { |
|
| 50 | 52 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
| 51 | 53 | }; |
| 52 | 54 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -62,7 +64,8 @@ discard block |
||
| 62 | 64 | { |
| 63 | 65 | $methods = ['GET']; |
| 64 | 66 | $pattern = '/hello/{first:\w+}/{last}'; |
| 65 | - $callable = function ($request, $response, $args) { |
|
| 67 | + $callable = function ($request, $response, $args) |
|
| 68 | + { |
|
| 66 | 69 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
| 67 | 70 | }; |
| 68 | 71 | $this->router->setBasePath('/base/path'); |
@@ -79,7 +82,8 @@ discard block |
||
| 79 | 82 | { |
| 80 | 83 | $methods = ['GET']; |
| 81 | 84 | $pattern = '/archive/{year}[/{month:[\d:{2}]}[/d/{day}]]'; |
| 82 | - $callable = function ($request, $response, $args) { |
|
| 85 | + $callable = function ($request, $response, $args) |
|
| 86 | + { |
|
| 83 | 87 | return $response; |
| 84 | 88 | }; |
| 85 | 89 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -103,7 +107,8 @@ discard block |
||
| 103 | 107 | { |
| 104 | 108 | $methods = ['GET']; |
| 105 | 109 | $pattern = '/hello/{name}'; |
| 106 | - $callable = function ($request, $response, $args) { |
|
| 110 | + $callable = function ($request, $response, $args) |
|
| 111 | + { |
|
| 107 | 112 | echo sprintf('Hello %s', $args['name']); |
| 108 | 113 | }; |
| 109 | 114 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -122,7 +127,8 @@ discard block |
||
| 122 | 127 | { |
| 123 | 128 | $methods = ['GET']; |
| 124 | 129 | $pattern = '/hello/{first}/{last}'; |
| 125 | - $callable = function ($request, $response, $args) { |
|
| 130 | + $callable = function ($request, $response, $args) |
|
| 131 | + { |
|
| 126 | 132 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
| 127 | 133 | }; |
| 128 | 134 | $route = $this->router->map($methods, $pattern, $callable); |
@@ -138,7 +144,8 @@ discard block |
||
| 138 | 144 | { |
| 139 | 145 | $methods = ['GET']; |
| 140 | 146 | $pattern = '/hello/{first}/{last}'; |
| 141 | - $callable = function ($request, $response, $args) { |
|
| 147 | + $callable = function ($request, $response, $args) |
|
| 148 | + { |
|
| 142 | 149 | echo sprintf('Hello %s %s', $args['first'], $args['last']); |
| 143 | 150 | }; |
| 144 | 151 | $route = $this->router->map($methods, $pattern, $callable); |