@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | foreach (\OC_APP::getEnabledApps() as $app) { |
| 101 | 101 | $appPath = \OC_App::getAppPath($app); |
| 102 | 102 | if ($appPath !== false) { |
| 103 | - $file = $appPath . '/appinfo/routes.php'; |
|
| 103 | + $file = $appPath.'/appinfo/routes.php'; |
|
| 104 | 104 | if (file_exists($file)) { |
| 105 | 105 | $this->routingFiles[$app] = $file; |
| 106 | 106 | } |
@@ -131,14 +131,14 @@ discard block |
||
| 131 | 131 | if (isset($this->loadedApps[$app])) { |
| 132 | 132 | return; |
| 133 | 133 | } |
| 134 | - $file = \OC_App::getAppPath($app) . '/appinfo/routes.php'; |
|
| 134 | + $file = \OC_App::getAppPath($app).'/appinfo/routes.php'; |
|
| 135 | 135 | if ($file !== false && file_exists($file)) { |
| 136 | 136 | $routingFiles = [$app => $file]; |
| 137 | 137 | } else { |
| 138 | 138 | $routingFiles = []; |
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | - \OC::$server->getEventLogger()->start('loadroutes' . $requestedApp, 'Loading Routes'); |
|
| 141 | + \OC::$server->getEventLogger()->start('loadroutes'.$requestedApp, 'Loading Routes'); |
|
| 142 | 142 | foreach ($routingFiles as $app => $file) { |
| 143 | 143 | if (!isset($this->loadedApps[$app])) { |
| 144 | 144 | if (!\OC_App::isAppLoaded($app)) { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if (!isset($this->loadedApps['core'])) { |
| 163 | 163 | $this->loadedApps['core'] = true; |
| 164 | 164 | $this->useCollection('root'); |
| 165 | - require_once __DIR__ . '/../../../core/routes.php'; |
|
| 165 | + require_once __DIR__.'/../../../core/routes.php'; |
|
| 166 | 166 | |
| 167 | 167 | // Also add the OCS collection |
| 168 | 168 | $collection = $this->getCollection('root.ocs'); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $collection->addPrefix('/ocs'); |
| 175 | 175 | $this->root->addCollection($collection); |
| 176 | 176 | } |
| 177 | - \OC::$server->getEventLogger()->end('loadroutes' . $requestedApp); |
|
| 177 | + \OC::$server->getEventLogger()->end('loadroutes'.$requestedApp); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -237,14 +237,14 @@ discard block |
||
| 237 | 237 | public function findMatchingRoute(string $url): array { |
| 238 | 238 | if (substr($url, 0, 6) === '/apps/') { |
| 239 | 239 | // empty string / 'apps' / $app / rest of the route |
| 240 | - [, , $app,] = explode('/', $url, 4); |
|
| 240 | + [,, $app, ] = explode('/', $url, 4); |
|
| 241 | 241 | |
| 242 | 242 | $app = \OC_App::cleanAppId($app); |
| 243 | 243 | \OC::$REQUESTEDAPP = $app; |
| 244 | 244 | $this->loadRoutes($app); |
| 245 | 245 | } elseif (substr($url, 0, 13) === '/ocsapp/apps/') { |
| 246 | 246 | // empty string / 'ocsapp' / 'apps' / $app / rest of the route |
| 247 | - [, , , $app,] = explode('/', $url, 5); |
|
| 247 | + [,,, $app, ] = explode('/', $url, 5); |
|
| 248 | 248 | |
| 249 | 249 | $app = \OC_App::cleanAppId($app); |
| 250 | 250 | \OC::$REQUESTEDAPP = $app; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | // However, since Symfony does not allow empty route names, the route |
| 271 | 271 | // we need to match is '/', so we need to append the '/' here. |
| 272 | 272 | try { |
| 273 | - $parameters = $matcher->match($url . '/'); |
|
| 273 | + $parameters = $matcher->match($url.'/'); |
|
| 274 | 274 | } catch (ResourceNotFoundException $newException) { |
| 275 | 275 | // If we still didn't match a route, we throw the original exception |
| 276 | 276 | throw $e; |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | private function getApplicationClass(string $appName) { |
| 436 | 436 | $appNameSpace = App::buildAppNamespace($appName); |
| 437 | 437 | |
| 438 | - $applicationClassName = $appNameSpace . '\\AppInfo\\Application'; |
|
| 438 | + $applicationClassName = $appNameSpace.'\\AppInfo\\Application'; |
|
| 439 | 439 | |
| 440 | 440 | if (class_exists($applicationClassName)) { |
| 441 | 441 | $application = \OC::$server->query($applicationClassName); |