@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | $router = new Router(); |
21 | 21 | $router->addInternalRoute( |
22 | 22 | "403", |
23 | - function () { |
|
23 | + function() { |
|
24 | 24 | return "403"; |
25 | 25 | } |
26 | 26 | ); |
27 | 27 | |
28 | - $router->add("test403", function () { |
|
28 | + $router->add("test403", function() { |
|
29 | 29 | throw new ForbiddenException("Message 403."); |
30 | 30 | }); |
31 | 31 | |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | $router = new Router(); |
50 | 50 | $router->addInternalRoute( |
51 | 51 | "404", |
52 | - function () { |
|
52 | + function() { |
|
53 | 53 | return "404"; |
54 | 54 | } |
55 | 55 | ); |
56 | 56 | |
57 | - $router->add("test404", function () { |
|
57 | + $router->add("test404", function() { |
|
58 | 58 | throw new NotFoundException("Message 404."); |
59 | 59 | }); |
60 | 60 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $router = new Router(); |
79 | 79 | $router->addInternalRoute( |
80 | 80 | "404", |
81 | - function () { |
|
81 | + function() { |
|
82 | 82 | return "404"; |
83 | 83 | } |
84 | 84 | ); |
@@ -105,12 +105,12 @@ discard block |
||
105 | 105 | $router = new Router(); |
106 | 106 | $router->addInternalRoute( |
107 | 107 | "500", |
108 | - function () { |
|
108 | + function() { |
|
109 | 109 | return "500"; |
110 | 110 | } |
111 | 111 | ); |
112 | 112 | |
113 | - $router->add("test500", function () { |
|
113 | + $router->add("test500", function() { |
|
114 | 114 | throw new \Exception("Message 500."); |
115 | 115 | }); |
116 | 116 | |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | $router = new Router(); |
128 | 128 | $router->addInternalRoute( |
129 | 129 | "500", |
130 | - function () { |
|
130 | + function() { |
|
131 | 131 | return "500"; |
132 | 132 | } |
133 | 133 | ); |
134 | 134 | $router->setMode(Router::PRODUCTION); |
135 | 135 | |
136 | - $router->add("test500", function () { |
|
136 | + $router->add("test500", function() { |
|
137 | 137 | throw new \Exception("Message 500."); |
138 | 138 | }); |
139 | 139 | |
@@ -157,12 +157,12 @@ discard block |
||
157 | 157 | $router = new Router(); |
158 | 158 | $router->addInternalRoute( |
159 | 159 | "500", |
160 | - function () { |
|
160 | + function() { |
|
161 | 161 | return "500"; |
162 | 162 | } |
163 | 163 | ); |
164 | 164 | |
165 | - $router->add("test500", function () { |
|
165 | + $router->add("test500", function() { |
|
166 | 166 | throw new InternalErrorException("Message 500."); |
167 | 167 | }); |
168 | 168 |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | { |
17 | 17 | $router = new Router(); |
18 | 18 | |
19 | - $router->add("about", function () { |
|
19 | + $router->add("about", function() { |
|
20 | 20 | return "about"; |
21 | 21 | }); |
22 | 22 | |
23 | - $router->add("about/me", function () { |
|
23 | + $router->add("about/me", function() { |
|
24 | 24 | return "about/me"; |
25 | 25 | }); |
26 | 26 | |
@@ -40,19 +40,19 @@ discard block |
||
40 | 40 | { |
41 | 41 | $router = new Router(); |
42 | 42 | |
43 | - $router->add("d", function () { |
|
43 | + $router->add("d", function() { |
|
44 | 44 | return "d"; |
45 | 45 | }); |
46 | 46 | |
47 | - $router->add("d/d", function () { |
|
47 | + $router->add("d/d", function() { |
|
48 | 48 | return "d/d"; |
49 | 49 | }); |
50 | 50 | |
51 | - $router->add("dev", function () { |
|
51 | + $router->add("dev", function() { |
|
52 | 52 | return "dev"; |
53 | 53 | }); |
54 | 54 | |
55 | - $router->add("dev/dev", function () { |
|
55 | + $router->add("dev/dev", function() { |
|
56 | 56 | return "dev/dev"; |
57 | 57 | }); |
58 | 58 | |
@@ -78,11 +78,11 @@ discard block |
||
78 | 78 | { |
79 | 79 | $router = new Router(); |
80 | 80 | |
81 | - $router->add("", function () { |
|
81 | + $router->add("", function() { |
|
82 | 82 | echo "1"; |
83 | 83 | }); |
84 | 84 | |
85 | - $router->add("", function () { |
|
85 | + $router->add("", function() { |
|
86 | 86 | echo "2"; |
87 | 87 | return true; |
88 | 88 | }); |
@@ -104,19 +104,19 @@ discard block |
||
104 | 104 | { |
105 | 105 | $router = new Router(); |
106 | 106 | |
107 | - $router->add("about", function () { |
|
107 | + $router->add("about", function() { |
|
108 | 108 | ; |
109 | 109 | }); |
110 | 110 | |
111 | - $router->add("about", function () { |
|
111 | + $router->add("about", function() { |
|
112 | 112 | return false; |
113 | 113 | }); |
114 | 114 | |
115 | - $router->add("about", function () { |
|
115 | + $router->add("about", function() { |
|
116 | 116 | return "yes"; |
117 | 117 | }); |
118 | 118 | |
119 | - $router->add("about", function () { |
|
119 | + $router->add("about", function() { |
|
120 | 120 | return "no"; |
121 | 121 | }); |
122 | 122 | |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | { |
134 | 134 | $router = new Router(); |
135 | 135 | |
136 | - $router->addInternalRoute("404", function () { |
|
136 | + $router->addInternalRoute("404", function() { |
|
137 | 137 | echo "404 "; |
138 | 138 | }); |
139 | 139 | |
140 | - $router->add("about/*", function () { |
|
140 | + $router->add("about/*", function() { |
|
141 | 141 | echo "about "; |
142 | 142 | return true; |
143 | 143 | }); |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | { |
164 | 164 | $router = new Router(); |
165 | 165 | |
166 | - $router->addInternalRoute("404", function () { |
|
166 | + $router->addInternalRoute("404", function() { |
|
167 | 167 | echo "404 "; |
168 | 168 | }); |
169 | 169 | |
170 | - $router->add("about/**", function () { |
|
170 | + $router->add("about/**", function() { |
|
171 | 171 | echo "about "; |
172 | 172 | return 1; |
173 | 173 | }); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | { |
194 | 194 | $router = new Router(); |
195 | 195 | |
196 | - $router->all(null, function () { |
|
196 | + $router->all(null, function() { |
|
197 | 197 | return "all"; |
198 | 198 | }); |
199 | 199 | $res = $router->handle("some/route"); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | { |
244 | 244 | $router = new Router(); |
245 | 245 | |
246 | - $router->addRoute(null, $mount, $path, function () use ($resp) { |
|
246 | + $router->addRoute(null, $mount, $path, function() use ($resp) { |
|
247 | 247 | return $resp; |
248 | 248 | }); |
249 | 249 | $res = $router->handle($query); |
@@ -323,7 +323,7 @@ |
||
323 | 323 | $res = $route->getHandlerType(); |
324 | 324 | $this->assertEquals("null", $res); |
325 | 325 | |
326 | - $route->set(null, null, null, function () { |
|
326 | + $route->set(null, null, null, function() { |
|
327 | 327 | return "hi"; |
328 | 328 | }); |
329 | 329 | $res = $route->getHandlerType(); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | $route = new Route(); |
20 | 20 | |
21 | - $route->set(null, null, null, function () { |
|
21 | + $route->set(null, null, null, function() { |
|
22 | 22 | return "handler"; |
23 | 23 | }); |
24 | 24 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | $route = new Route(); |
37 | 37 | |
38 | - $function = function () { |
|
38 | + $function = function() { |
|
39 | 39 | return "handler"; |
40 | 40 | }; |
41 | 41 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $route = new Route(); |
115 | 115 | $di = new DI(); |
116 | 116 | |
117 | - $route->set(null, null, null, function ($di) { |
|
117 | + $route->set(null, null, null, function($di) { |
|
118 | 118 | return $di; |
119 | 119 | }); |
120 | 120 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $type = null; |
43 | 43 | if ($pos !== false) { |
44 | 44 | $type = substr($part, $pos + 1); |
45 | - if (! $this->checkPartMatchingType($queryPart, $type)) { |
|
45 | + if (!$this->checkPartMatchingType($queryPart, $type)) { |
|
46 | 46 | return false; |
47 | 47 | } |
48 | 48 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | switch ($type) { |
103 | 103 | case "digit": |
104 | - return (int) $value; |
|
104 | + return (int)$value; |
|
105 | 105 | break; |
106 | 106 | |
107 | 107 | default: |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $args = []; |
223 | 223 | |
224 | 224 | for ($i = 0; $i < $ruleCount; $i++) { |
225 | - $rulePart = isset($ruleParts[$i]) ? $ruleParts[$i] : null; |
|
225 | + $rulePart = isset($ruleParts[$i]) ? $ruleParts[$i] : null; |
|
226 | 226 | $queryPart = isset($queryParts[$i]) ? $queryParts[$i] : null; |
227 | 227 | |
228 | 228 | if ($rulePart === "**") { |
@@ -341,8 +341,8 @@ |
||
341 | 341 | |
342 | 342 | |
343 | 343 | /** |
344 | - * Add a default route which will be applied for any path and any |
|
345 | - * request method. |
|
344 | + * Add a default route which will be applied for any path and any |
|
345 | + * request method. |
|
346 | 346 | * |
347 | 347 | * @param string|callable $handler a callback handler for the route. |
348 | 348 | * @param string $info description of the route |
@@ -6,7 +6,7 @@ |
||
6 | 6 | "services" => [ |
7 | 7 | "textfilter" => [ |
8 | 8 | "shared" => true, |
9 | - "callback" => function () { |
|
9 | + "callback" => function() { |
|
10 | 10 | $filter = new \Anax\TextFilter\TextFilter(); |
11 | 11 | if (is_dir(ANAX_INSTALL_PATH . "/content")) { |
12 | 12 | $filter->setFilterConfig("frontmatter", [ |
@@ -2,8 +2,8 @@ |
||
2 | 2 | /** |
3 | 3 | * Set the error reporting. |
4 | 4 | */ |
5 | -error_reporting(-1); // Report all type of errors |
|
6 | -ini_set('display_errors', 1); // Display all errors |
|
5 | +error_reporting(-1); // Report all type of errors |
|
6 | +ini_set('display_errors', 1); // Display all errors |
|
7 | 7 | |
8 | 8 | |
9 | 9 | /** |
@@ -10,9 +10,9 @@ discard block |
||
10 | 10 | */ |
11 | 11 | class TextFilterFilterMoreAndStopTest extends TestCase |
12 | 12 | { |
13 | - /** |
|
14 | - * Test <!--more--> |
|
15 | - */ |
|
13 | + /** |
|
14 | + * Test <!--more--> |
|
15 | + */ |
|
16 | 16 | public function testMore() |
17 | 17 | { |
18 | 18 | $filter = new TextFilter(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | |
41 | 41 | /** |
42 | - * Test <!--stop--> |
|
42 | + * Test <!--stop--> |
|
43 | 43 | */ |
44 | 44 | public function testStop() |
45 | 45 | { |