Passed
Push — master ( 613f0f...8f650f )
by Roeland
11:57 queued 12s
created
apps/files_sharing/lib/AppInfo/Application.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		/**
79 79
 		 * Core class wrappers
80 80
 		 */
81
-		$container->registerService(Manager::class, function (SimpleContainer $c) use ($server) {
81
+		$container->registerService(Manager::class, function(SimpleContainer $c) use ($server) {
82 82
 			$user = $server->getUserSession()->getUser();
83 83
 			$uid = $user ? $user->getUID() : null;
84 84
 			return new \OCA\Files_Sharing\External\Manager(
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
 		$container->registerMiddleWare(OCSShareAPIMiddleware::class);
104 104
 		$container->registerMiddleWare(ShareInfoMiddleware::class);
105 105
 
106
-		$container->registerService('ExternalMountProvider', function (IContainer $c) {
106
+		$container->registerService('ExternalMountProvider', function(IContainer $c) {
107 107
 			/** @var \OCP\IServerContainer $server */
108 108
 			$server = $c->query('ServerContainer');
109 109
 			return new \OCA\Files_Sharing\External\MountProvider(
110 110
 				$server->getDatabaseConnection(),
111
-				function () use ($c) {
111
+				function() use ($c) {
112 112
 					return $c->query(Manager::class);
113 113
 				},
114 114
 				$server->getCloudIdManager()
@@ -142,19 +142,19 @@  discard block
 block discarded – undo
142 142
 		$dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class);
143 143
 		$dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class);
144 144
 		$dispatcher->addServiceListener(ShareCreatedEvent::class, ShareInteractionListener::class);
145
-		$dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function () {
145
+		$dispatcher->addListener('\OCP\Collaboration\Resources::loadAdditionalScripts', function() {
146 146
 			\OCP\Util::addScript('files_sharing', 'dist/collaboration');
147 147
 		});
148 148
 		$dispatcher->addServiceListener(ShareCreatedEvent::class, UserShareAcceptanceListener::class);
149 149
 		$dispatcher->addServiceListener(UserAddedEvent::class, UserAddedToGroupListener::class);
150 150
 
151 151
 		// notifications api to accept incoming user shares
152
-		$dispatcher->addListener('OCP\Share::postShare', function (GenericEvent $event) {
152
+		$dispatcher->addListener('OCP\Share::postShare', function(GenericEvent $event) {
153 153
 			/** @var Listener $listener */
154 154
 			$listener = $this->getContainer()->query(Listener::class);
155 155
 			$listener->shareNotification($event);
156 156
 		});
157
-		$dispatcher->addListener(IGroup::class . '::postAddUser', function (GenericEvent $event) {
157
+		$dispatcher->addListener(IGroup::class.'::postAddUser', function(GenericEvent $event) {
158 158
 			/** @var Listener $listener */
159 159
 			$listener = $this->getContainer()->query(Listener::class);
160 160
 			$listener->userAddedToGroup($event);
Please login to merge, or discard this patch.
lib/private/Route/Router.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	/**
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
 	public function match($url) {
246 246
 		if (substr($url, 0, 6) === '/apps/') {
247 247
 			// empty string / 'apps' / $app / rest of the route
248
-			list(, , $app,) = explode('/', $url, 4);
248
+			list(,, $app,) = explode('/', $url, 4);
249 249
 
250 250
 			$app = \OC_App::cleanAppId($app);
251 251
 			\OC::$REQUESTEDAPP = $app;
252 252
 			$this->loadRoutes($app);
253 253
 		} elseif (substr($url, 0, 13) === '/ocsapp/apps/') {
254 254
 			// empty string / 'ocsapp' / 'apps' / $app / rest of the route
255
-			list(, , , $app,) = explode('/', $url, 5);
255
+			list(,,, $app,) = explode('/', $url, 5);
256 256
 
257 257
 			$app = \OC_App::cleanAppId($app);
258 258
 			\OC::$REQUESTEDAPP = $app;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 				// However, since Symfony does not allow empty route names, the route
279 279
 				// we need to match is '/', so we need to append the '/' here.
280 280
 				try {
281
-					$parameters = $matcher->match($url . '/');
281
+					$parameters = $matcher->match($url.'/');
282 282
 				} catch (ResourceNotFoundException $newException) {
283 283
 					// If we still didn't match a route, we throw the original exception
284 284
 					throw $e;
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 		if (is_array($routes)) {
398 398
 			$appNameSpace = App::buildAppNamespace($appName);
399 399
 
400
-			$applicationClassName = $appNameSpace . '\\AppInfo\\Application';
400
+			$applicationClassName = $appNameSpace.'\\AppInfo\\Application';
401 401
 
402 402
 			if (class_exists($applicationClassName)) {
403 403
 				$application = \OC::$server->query($applicationClassName);
Please login to merge, or discard this patch.
lib/private/AppFramework/Routing/RouteConfig.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
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);
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
 	protected function processRoute(array $route, string $routeNamePrefix = ''): void {
125 125
 		$name = $route['name'];
126 126
 		$postfix = $route['postfix'] ?? '';
127
-		$defaultRoot = $this->appName === 'core' ? '' : '/apps/' . $this->appName;
127
+		$defaultRoot = $this->appName === 'core' ? '' : '/apps/'.$this->appName;
128 128
 		$root = $route['root'] ?? $defaultRoot;
129 129
 		if ($routeNamePrefix === '' && !\in_array($this->appName, $this->rootUrlApps, true)) {
130 130
 			// Only allow root URLS for some apps
131 131
 			$root = $defaultRoot;
132 132
 		}
133 133
 
134
-		$url = $root . $route['url'];
134
+		$url = $root.$route['url'];
135 135
 		$verb = strtoupper($route['verb'] ?? 'GET');
136 136
 
137 137
 		$split = explode('#', $name, 2);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 		$controllerName = $this->buildControllerName($controller);
144 144
 		$actionName = $this->buildActionName($action);
145 145
 
146
-		$routeName = $routeNamePrefix . $this->appName . '.' . $controller . '.' . $action . $postfix;
146
+		$routeName = $routeNamePrefix.$this->appName.'.'.$controller.'.'.$action.$postfix;
147 147
 
148 148
 		// register the route
149 149
 		$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 
188 188
 		$resources = $routes['ocs-resources'] ?? [];
189 189
 		foreach ($resources as $resource => $config) {
190
-			$root = $config['root'] ?? '/apps/' . $this->appName;
190
+			$root = $config['root'] ?? '/apps/'.$this->appName;
191 191
 
192 192
 			// the url parameter used as id to the resource
193 193
 			foreach ($actions as $action) {
194
-				$url = $root . $config['url'];
194
+				$url = $root.$config['url'];
195 195
 				$method = $action['name'];
196 196
 				$verb = strtoupper($action['verb'] ?? 'GET');
197 197
 				$collectionAction = $action['on-collection'] ?? false;
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 					$url .= '/{id}';
200 200
 				}
201 201
 				if (isset($action['url-postfix'])) {
202
-					$url .= '/' . $action['url-postfix'];
202
+					$url .= '/'.$action['url-postfix'];
203 203
 				}
204 204
 
205 205
 				$controller = $resource;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 				$controllerName = $this->buildControllerName($controller);
208 208
 				$actionName = $this->buildActionName($method);
209 209
 
210
-				$routeName = 'ocs.' . $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
210
+				$routeName = 'ocs.'.$this->appName.'.'.strtolower($resource).'.'.strtolower($method);
211 211
 
212 212
 				$this->router->create($routeName, $url)->method($verb)->action(
213 213
 					new RouteActionHandler($this->container, $controllerName, $actionName)
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 					$url .= '/{id}';
250 250
 				}
251 251
 				if (isset($action['url-postfix'])) {
252
-					$url .= '/' . $action['url-postfix'];
252
+					$url .= '/'.$action['url-postfix'];
253 253
 				}
254 254
 
255 255
 				$controller = $resource;
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 				$controllerName = $this->buildControllerName($controller);
258 258
 				$actionName = $this->buildActionName($method);
259 259
 
260
-				$routeName = $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
260
+				$routeName = $this->appName.'.'.strtolower($resource).'.'.strtolower($method);
261 261
 
262 262
 				$this->router->create($routeName, $url)->method($verb)->action(
263 263
 					new RouteActionHandler($this->container, $controllerName, $actionName)
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	 */
274 274
 	private function buildControllerName(string $controller): string {
275 275
 		if (!isset($this->controllerNameCache[$controller])) {
276
-			$this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller';
276
+			$this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)).'Controller';
277 277
 		}
278 278
 		return $this->controllerNameCache[$controller];
279 279
 	}
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 		$pattern = '/_[a-z]?/';
297 297
 		return preg_replace_callback(
298 298
 			$pattern,
299
-			function ($matches) {
299
+			function($matches) {
300 300
 				return strtoupper(ltrim($matches[0], '_'));
301 301
 			},
302 302
 			$str);
Please login to merge, or discard this patch.
lib/public/AppFramework/AuthPublicShareController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 		if (substr($class, -10) === 'Controller') {
169 169
 			$class = substr($class, 0, -10);
170 170
 		}
171
-		return $app .'.'. $class .'.'. $function;
171
+		return $app.'.'.$class.'.'.$function;
172 172
 	}
173 173
 
174 174
 	/**
Please login to merge, or discard this patch.