@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $postfix = $route['postfix'] ?? ''; |
96 | 96 | $root = $this->buildRootPrefix($route, $appName, $routeNamePrefix); |
97 | 97 | |
98 | - $url = $root . '/' . ltrim($route['url'], '/'); |
|
98 | + $url = $root.'/'.ltrim($route['url'], '/'); |
|
99 | 99 | $verb = strtoupper($route['verb'] ?? 'GET'); |
100 | 100 | |
101 | 101 | $split = explode('#', $name, 2); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $controllerName = $this->buildControllerName($controller); |
108 | 108 | $actionName = $this->buildActionName($action); |
109 | 109 | |
110 | - $routeName = $routeNamePrefix . $appName . '.' . $controller . '.' . $action . $postfix; |
|
110 | + $routeName = $routeNamePrefix.$appName.'.'.$controller.'.'.$action.$postfix; |
|
111 | 111 | |
112 | 112 | $routeObject = new Route($url); |
113 | 113 | $routeObject->method($verb); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | // the url parameter used as id to the resource |
188 | 188 | foreach ($actions as $action) { |
189 | - $url = $root . '/' . ltrim($config['url'], '/'); |
|
189 | + $url = $root.'/'.ltrim($config['url'], '/'); |
|
190 | 190 | $method = $action['name']; |
191 | 191 | |
192 | 192 | $verb = strtoupper($action['verb'] ?? 'GET'); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $controllerName = $this->buildControllerName($controller); |
201 | 201 | $actionName = $this->buildActionName($method); |
202 | 202 | |
203 | - $routeName = $routeNamePrefix . $appName . '.' . strtolower($resource) . '.' . $method; |
|
203 | + $routeName = $routeNamePrefix.$appName.'.'.strtolower($resource).'.'.$method; |
|
204 | 204 | |
205 | 205 | $route = new Route($url); |
206 | 206 | $route->method($verb); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | private function buildRootPrefix(array $route, string $appName, string $routeNamePrefix): string { |
218 | - $defaultRoot = $appName === 'core' ? '' : '/apps/' . $appName; |
|
218 | + $defaultRoot = $appName === 'core' ? '' : '/apps/'.$appName; |
|
219 | 219 | $root = $route['root'] ?? $defaultRoot; |
220 | 220 | |
221 | 221 | if ($routeNamePrefix !== '') { |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | private function buildControllerName(string $controller): string { |
240 | 240 | if (!isset($this->controllerNameCache[$controller])) { |
241 | - $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller'; |
|
241 | + $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)).'Controller'; |
|
242 | 242 | } |
243 | 243 | return $this->controllerNameCache[$controller]; |
244 | 244 | } |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $pattern = '/_[a-z]?/'; |
262 | 262 | return preg_replace_callback( |
263 | 263 | $pattern, |
264 | - function ($matches) { |
|
264 | + function($matches) { |
|
265 | 265 | return strtoupper(ltrim($matches[0], '_')); |
266 | 266 | }, |
267 | 267 | $str); |