@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * OCS routes go into a different collection |
92 | 92 | */ |
93 | 93 | $oldCollection = $this->router->getCurrentCollection(); |
94 | - $this->router->useCollection($oldCollection . '.ocs'); |
|
94 | + $this->router->useCollection($oldCollection.'.ocs'); |
|
95 | 95 | |
96 | 96 | // parse ocs simple routes |
97 | 97 | $this->processOCS($this->routes); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $postfix = $route['postfix'] ?? ''; |
127 | 127 | $root = $this->buildRootPrefix($route, $routeNamePrefix); |
128 | 128 | |
129 | - $url = $root . '/' . ltrim($route['url'], '/'); |
|
129 | + $url = $root.'/'.ltrim($route['url'], '/'); |
|
130 | 130 | $verb = strtoupper($route['verb'] ?? 'GET'); |
131 | 131 | |
132 | 132 | $split = explode('#', $name, 2); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $controllerName = $this->buildControllerName($controller); |
139 | 139 | $actionName = $this->buildActionName($action); |
140 | 140 | |
141 | - $routeName = $routeNamePrefix . $this->appName . '.' . $controller . '.' . $action . $postfix; |
|
141 | + $routeName = $routeNamePrefix.$this->appName.'.'.$controller.'.'.$action.$postfix; |
|
142 | 142 | |
143 | 143 | $router = $this->router->create($routeName, $url) |
144 | 144 | ->method($verb); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | |
215 | 215 | // the url parameter used as id to the resource |
216 | 216 | foreach ($actions as $action) { |
217 | - $url = $root . '/' . ltrim($config['url'], '/'); |
|
217 | + $url = $root.'/'.ltrim($config['url'], '/'); |
|
218 | 218 | $method = $action['name']; |
219 | 219 | |
220 | 220 | $verb = strtoupper($action['verb'] ?? 'GET'); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $url .= '/{id}'; |
224 | 224 | } |
225 | 225 | if (isset($action['url-postfix'])) { |
226 | - $url .= '/' . $action['url-postfix']; |
|
226 | + $url .= '/'.$action['url-postfix']; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | $controller = $resource; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $controllerName = $this->buildControllerName($controller); |
232 | 232 | $actionName = $this->buildActionName($method); |
233 | 233 | |
234 | - $routeName = $routeNamePrefix . $this->appName . '.' . strtolower($resource) . '.' . strtolower($method); |
|
234 | + $routeName = $routeNamePrefix.$this->appName.'.'.strtolower($resource).'.'.strtolower($method); |
|
235 | 235 | |
236 | 236 | $route = $this->router->create($routeName, $url) |
237 | 237 | ->method($verb); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | private function buildRootPrefix(array $route, string $routeNamePrefix): string { |
245 | - $defaultRoot = $this->appName === 'core' ? '' : '/apps/' . $this->appName; |
|
245 | + $defaultRoot = $this->appName === 'core' ? '' : '/apps/'.$this->appName; |
|
246 | 246 | $root = $route['root'] ?? $defaultRoot; |
247 | 247 | |
248 | 248 | if ($routeNamePrefix !== '') { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | */ |
266 | 266 | private function buildControllerName(string $controller): string { |
267 | 267 | if (!isset($this->controllerNameCache[$controller])) { |
268 | - $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller'; |
|
268 | + $this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)).'Controller'; |
|
269 | 269 | } |
270 | 270 | return $this->controllerNameCache[$controller]; |
271 | 271 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $pattern = '/_[a-z]?/'; |
289 | 289 | return preg_replace_callback( |
290 | 290 | $pattern, |
291 | - function ($matches) { |
|
291 | + function($matches) { |
|
292 | 292 | return strtoupper(ltrim($matches[0], '_')); |
293 | 293 | }, |
294 | 294 | $str); |