Passed
Push — master ( d52ee8...0e6e80 )
by Joas
52:59 queued 30:23
created
lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,9 +211,9 @@
 block discarded – undo
211 211
 	public function afterException($controller, $methodName, \Exception $exception): Response {
212 212
 		if ($exception instanceof SecurityException) {
213 213
 			if ($exception instanceof StrictCookieMissingException) {
214
-				return new RedirectResponse(\OC::$WEBROOT . '/');
214
+				return new RedirectResponse(\OC::$WEBROOT.'/');
215 215
 			}
216
-			if (stripos($this->request->getHeader('Accept'),'html') === false) {
216
+			if (stripos($this->request->getHeader('Accept'), 'html') === false) {
217 217
 				$response = new JSONResponse(
218 218
 					['message' => $exception->getMessage()],
219 219
 					$exception->getCode()
Please login to merge, or discard this patch.
lib/private/Files/Mount/MountPoint.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		} else {
109 109
 			// Update old classes to new namespace
110 110
 			if (strpos($storage, 'OC_Filestorage_') !== false) {
111
-				$storage = '\OC\Files\Storage\\' . substr($storage, 15);
111
+				$storage = '\OC\Files\Storage\\'.substr($storage, 15);
112 112
 			}
113 113
 			$this->class = $storage;
114 114
 			$this->arguments = $arguments;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 				return;
161 161
 			}
162 162
 		} else {
163
-			\OCP\Util::writeLog('core', 'storage backend ' . $this->class . ' not found', ILogger::ERROR);
163
+			\OCP\Util::writeLog('core', 'storage backend '.$this->class.' not found', ILogger::ERROR);
164 164
 			$this->invalidStorage = true;
165 165
 			return;
166 166
 		}
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 	 */
211 211
 	public function getInternalPath($path) {
212 212
 		$path = Filesystem::normalizePath($path, true, false, true);
213
-		if ($this->mountPoint === $path or $this->mountPoint . '/' === $path) {
213
+		if ($this->mountPoint === $path or $this->mountPoint.'/' === $path) {
214 214
 			$internalPath = '';
215 215
 		} else {
216 216
 			$internalPath = substr($path, strlen($this->mountPoint));
217 217
 		}
218 218
 		// substr returns false instead of an empty string, we always want a string
219
-		return (string)$internalPath;
219
+		return (string) $internalPath;
220 220
 	}
221 221
 
222 222
 	/**
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 	 */
270 270
 	public function getStorageRootId() {
271 271
 		if (is_null($this->rootId) || $this->rootId === -1) {
272
-			$this->rootId = (int)$this->getStorage()->getCache()->getId('');
272
+			$this->rootId = (int) $this->getStorage()->getCache()->getId('');
273 273
 		}
274 274
 		return $this->rootId;
275 275
 	}
Please login to merge, or discard this patch.
lib/private/Files/Storage/Common.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 			$this->mkdir($path2);
225 225
 			while ($file = readdir($dir)) {
226 226
 				if (!Filesystem::isIgnoredDir($file)) {
227
-					if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
227
+					if (!$this->copy($path1.'/'.$file, $path2.'/'.$file)) {
228 228
 						return false;
229 229
 					}
230 230
 				}
@@ -278,12 +278,12 @@  discard block
 block discarded – undo
278 278
 		if (is_resource($dh)) {
279 279
 			while (($file = readdir($dh)) !== false) {
280 280
 				if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
281
-					if ($this->is_dir($path . '/' . $file)) {
282
-						mkdir($target . '/' . $file);
283
-						$this->addLocalFolder($path . '/' . $file, $target . '/' . $file);
281
+					if ($this->is_dir($path.'/'.$file)) {
282
+						mkdir($target.'/'.$file);
283
+						$this->addLocalFolder($path.'/'.$file, $target.'/'.$file);
284 284
 					} else {
285
-						$tmp = $this->toTmpFile($path . '/' . $file);
286
-						rename($tmp, $target . '/' . $file);
285
+						$tmp = $this->toTmpFile($path.'/'.$file);
286
+						rename($tmp, $target.'/'.$file);
287 287
 					}
288 288
 				}
289 289
 			}
@@ -304,10 +304,10 @@  discard block
 block discarded – undo
304 304
 					continue;
305 305
 				}
306 306
 				if (strstr(strtolower($item), strtolower($query)) !== false) {
307
-					$files[] = $dir . '/' . $item;
307
+					$files[] = $dir.'/'.$item;
308 308
 				}
309
-				if ($this->is_dir($dir . '/' . $item)) {
310
-					$files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item));
309
+				if ($this->is_dir($dir.'/'.$item)) {
310
+					$files = array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
311 311
 				}
312 312
 			}
313 313
 		}
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 		if (!isset($this->watcher)) {
359 359
 			$this->watcher = new Watcher($storage);
360 360
 			$globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER);
361
-			$this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy));
361
+			$this->watcher->setPolicy((int) $this->getMountOption('filesystem_check_changes', $globalPolicy));
362 362
 		}
363 363
 		return $this->watcher;
364 364
 	}
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 		}
376 376
 		if (!isset($storage->propagator)) {
377 377
 			$config = \OC::$server->getSystemConfig();
378
-			$storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_' . $config->getValue('instanceid')]);
378
+			$storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_'.$config->getValue('instanceid')]);
379 379
 		}
380 380
 		return $storage->propagator;
381 381
 	}
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	 */
434 434
 	public function cleanPath($path) {
435 435
 		if (strlen($path) == 0 or $path[0] != '/') {
436
-			$path = '/' . $path;
436
+			$path = '/'.$path;
437 437
 		}
438 438
 
439 439
 		$output = [];
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 			\OC::$server->getLogger()->info("External storage not available: stat() failed");
462 462
 			return false;
463 463
 		} catch (\Exception $e) {
464
-			\OC::$server->getLogger()->warning("External storage not available: " . $e->getMessage());
464
+			\OC::$server->getLogger()->warning("External storage not available: ".$e->getMessage());
465 465
 			\OC::$server->getLogger()->logException($e, ['level' => ILogger::WARN]);
466 466
 			return false;
467 467
 		}
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 			if (is_resource($dh)) {
615 615
 				while ($result and ($file = readdir($dh)) !== false) {
616 616
 					if (!Filesystem::isIgnoredDir($file)) {
617
-						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);
617
+						$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath.'/'.$file, $targetInternalPath.'/'.$file);
618 618
 					}
619 619
 				}
620 620
 			}
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 				$this->getCache()->remove($targetInternalPath);
641 641
 			}
642 642
 		}
643
-		return (bool)$result;
643
+		return (bool) $result;
644 644
 	}
645 645
 
646 646
 	/**
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
 			);
748 748
 		}
749 749
 		try {
750
-			$provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type, $this->getId() . '::' . $path);
750
+			$provider->acquireLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type, $this->getId().'::'.$path);
751 751
 		} catch (LockedException $e) {
752 752
 			if ($logger) {
753 753
 				$logger->logException($e, ['level' => ILogger::INFO]);
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
 			);
780 780
 		}
781 781
 		try {
782
-			$provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
782
+			$provider->releaseLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
783 783
 		} catch (LockedException $e) {
784 784
 			if ($logger) {
785 785
 				$logger->logException($e, ['level' => ILogger::INFO]);
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 			);
812 812
 		}
813 813
 		try {
814
-			$provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
814
+			$provider->changeLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type);
815 815
 		} catch (LockedException $e) {
816 816
 			\OC::$server->getLogger()->logException($e, ['level' => ILogger::INFO]);
817 817
 			throw $e;
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 			$basePath = rtrim($directory, '/');
876 876
 			while (($file = readdir($dh)) !== false) {
877 877
 				if (!Filesystem::isIgnoredDir($file) && !Filesystem::isFileBlacklisted($file)) {
878
-					$childPath = $basePath . '/' . trim($file, '/');
878
+					$childPath = $basePath.'/'.trim($file, '/');
879 879
 					$metadata = $this->getMetaData($childPath);
880 880
 					if ($metadata !== null) {
881 881
 						yield $metadata;
Please login to merge, or discard this patch.
apps/files_external/appinfo/app.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 use OCA\Files_External\Config\ConfigAdapter;
32 32
 
33
-require_once __DIR__ . '/../3rdparty/autoload.php';
33
+require_once __DIR__.'/../3rdparty/autoload.php';
34 34
 
35 35
 // register Application object singleton
36 36
 \OCA\Files_External\MountConfig::$app = \OC::$server->query(\OCA\Files_External\AppInfo\Application::class);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 $appContainer = \OCA\Files_External\MountConfig::$app->getContainer();
40 40
 
41
-\OCA\Files\App::getNavigationManager()->add(function () {
41
+\OCA\Files\App::getNavigationManager()->add(function() {
42 42
 	$l = \OC::$server->getL10N('files_external');
43 43
 	return [
44 44
 		'id' => 'extstoragemounts',
Please login to merge, or discard this patch.
apps/dav/appinfo/v1/publicwebdav.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $linkCheckPlugin = new \OCA\DAV\Files\Sharing\PublicLinkCheckPlugin();
65 65
 $filesDropPlugin = new \OCA\DAV\Files\Sharing\FilesDropPlugin();
66 66
 
67
-$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
67
+$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function(\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
68 68
 	$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
69 69
 	/** @var \OCA\FederatedFileSharing\FederatedShareProvider $shareProvider */
70 70
 	$federatedShareProvider = \OC::$server->query(\OCA\FederatedFileSharing\FederatedShareProvider::class);
@@ -80,17 +80,17 @@  discard block
 block discarded – undo
80 80
 
81 81
 	// FIXME: should not add storage wrappers outside of preSetup, need to find a better way
82 82
 	$previousLog = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false);
83
-	\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
83
+	\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function($mountPoint, $storage) use ($share) {
84 84
 		return new \OC\Files\Storage\Wrapper\PermissionsMask(['storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE]);
85 85
 	});
86
-	\OC\Files\Filesystem::addStorageWrapper('shareOwner', function ($mountPoint, $storage) use ($share) {
86
+	\OC\Files\Filesystem::addStorageWrapper('shareOwner', function($mountPoint, $storage) use ($share) {
87 87
 		return new \OCA\DAV\Storage\PublicOwnerWrapper(['storage' => $storage, 'owner' => $share->getShareOwner()]);
88 88
 	});
89 89
 	\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog);
90 90
 
91 91
 	OC_Util::tearDownFS();
92 92
 	OC_Util::setupFS($owner);
93
-	$ownerView = new \OC\Files\View('/'. $owner . '/files');
93
+	$ownerView = new \OC\Files\View('/'.$owner.'/files');
94 94
 	$path = $ownerView->getPath($fileId);
95 95
 	$fileInfo = $ownerView->getFileInfo($path);
96 96
 	$linkCheckPlugin->setFileInfo($fileInfo);
Please login to merge, or discard this patch.
lib/private/Files/Type/Detection.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 	}
127 127
 
128 128
 	private function loadCustomDefinitions(string $fileName, array $definitions): array {
129
-		if (file_exists($this->customConfigDir . '/' . $fileName)) {
130
-			$custom = json_decode(file_get_contents($this->customConfigDir . '/' . $fileName), true);
129
+		if (file_exists($this->customConfigDir.'/'.$fileName)) {
130
+			$custom = json_decode(file_get_contents($this->customConfigDir.'/'.$fileName), true);
131 131
 			if (json_last_error() === JSON_ERROR_NONE) {
132 132
 				$definitions = array_merge($definitions, $custom);
133 133
 			} else {
134
-				$this->logger->warning('Failed to parse ' . $fileName . ': ' . json_last_error_msg());
134
+				$this->logger->warning('Failed to parse '.$fileName.': '.json_last_error_msg());
135 135
 			}
136 136
 		}
137 137
 		return $definitions;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			return;
146 146
 		}
147 147
 
148
-		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true);
148
+		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true);
149 149
 		$this->mimeTypeAlias = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEALIASES, $this->mimeTypeAlias);
150 150
 	}
151 151
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
 	public function getOnlyDefaultAliases(): array {
161 161
 		$this->loadMappings();
162
-		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true);
162
+		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true);
163 163
 		return $this->mimeTypeAlias;
164 164
 	}
165 165
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 			return;
172 172
 		}
173 173
 
174
-		$mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypemapping.dist.json'), true);
174
+		$mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypemapping.dist.json'), true);
175 175
 		$mimetypeMapping = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEMAPPING, $mimetypeMapping);
176 176
 
177 177
 		$this->registerTypeArray($mimetypeMapping);
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
 		// Icon exists?
368 368
 		try {
369
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.svg');
369
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$icon.'.svg');
370 370
 			return $this->mimetypeIcons[$mimetype];
371 371
 		} catch (\RuntimeException $e) {
372 372
 			// Specified image not found
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		if (strpos($icon, '-')) {
378 378
 			$mimePart = substr($icon, 0, strpos($icon, '-'));
379 379
 			try {
380
-				$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.svg');
380
+				$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$mimePart.'.svg');
381 381
 				return $this->mimetypeIcons[$mimetype];
382 382
 			} catch (\RuntimeException $e) {
383 383
 				// Image for the first part of the mimetype not found
Please login to merge, or discard this patch.
apps/files_sharing/lib/Listener/LegacyBeforeTemplateRenderedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		$eventName = 'OCA\Files_Sharing::loadAdditionalScripts';
51 51
 
52 52
 		if ($event->getScope() !== null) {
53
-			$eventName .= '::' . $event->getScope();
53
+			$eventName .= '::'.$event->getScope();
54 54
 		}
55 55
 
56 56
 		$legacyEvent = new GenericEvent(null, ['share' => $event->getShare()]);
Please login to merge, or discard this patch.
lib/private/ServerContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 		if (isset($this->namespaces[$namespace])) {
105 105
 			if (!isset($this->hasNoAppContainer[$namespace])) {
106
-				$applicationClassName = 'OCA\\' . $sensitiveNamespace . '\\AppInfo\\Application';
106
+				$applicationClassName = 'OCA\\'.$sensitiveNamespace.'\\AppInfo\\Application';
107 107
 				if (class_exists($applicationClassName)) {
108 108
 					$app = new $applicationClassName();
109 109
 					if (isset($this->appContainers[$namespace])) {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		}
160 160
 
161 161
 		try {
162
-			[,$namespace,] = explode('\\', $id);
162
+			[,$namespace, ] = explode('\\', $id);
163 163
 			return $this->getAppContainer(strtolower($namespace), $namespace);
164 164
 		} catch (QueryException $e) {
165 165
 			return null;
Please login to merge, or discard this patch.
lib/private/AppFramework/DependencyInjection/DIContainer.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -115,68 +115,68 @@  discard block
 block discarded – undo
115 115
 		/**
116 116
 		 * Core services
117 117
 		 */
118
-		$this->registerService(IOutput::class, function () {
118
+		$this->registerService(IOutput::class, function() {
119 119
 			return new Output($this->getServer()->getWebRoot());
120 120
 		});
121 121
 
122
-		$this->registerService(Folder::class, function () {
122
+		$this->registerService(Folder::class, function() {
123 123
 			return $this->getServer()->getUserFolder();
124 124
 		});
125 125
 
126
-		$this->registerService(IAppData::class, function (ContainerInterface $c) {
126
+		$this->registerService(IAppData::class, function(ContainerInterface $c) {
127 127
 			return $this->getServer()->getAppDataDir($c->get('AppName'));
128 128
 		});
129 129
 
130
-		$this->registerService(IL10N::class, function (ContainerInterface $c) {
130
+		$this->registerService(IL10N::class, function(ContainerInterface $c) {
131 131
 			return $this->getServer()->getL10N($c->get('AppName'));
132 132
 		});
133 133
 
134 134
 		// Log wrappers
135
-		$this->registerService(LoggerInterface::class, function (ContainerInterface $c) {
135
+		$this->registerService(LoggerInterface::class, function(ContainerInterface $c) {
136 136
 			return new ScopedPsrLogger(
137 137
 				$c->get(PsrLoggerAdapter::class),
138 138
 				$c->get('AppName')
139 139
 			);
140 140
 		});
141
-		$this->registerService(ILogger::class, function (ContainerInterface $c) {
141
+		$this->registerService(ILogger::class, function(ContainerInterface $c) {
142 142
 			return new OC\AppFramework\Logger($this->server->query(ILogger::class), $c->get('AppName'));
143 143
 		});
144 144
 
145
-		$this->registerService(IServerContainer::class, function () {
145
+		$this->registerService(IServerContainer::class, function() {
146 146
 			return $this->getServer();
147 147
 		});
148 148
 		$this->registerAlias('ServerContainer', IServerContainer::class);
149 149
 
150
-		$this->registerService(\OCP\WorkflowEngine\IManager::class, function (ContainerInterface $c) {
150
+		$this->registerService(\OCP\WorkflowEngine\IManager::class, function(ContainerInterface $c) {
151 151
 			return $c->get(Manager::class);
152 152
 		});
153 153
 
154
-		$this->registerService(ContainerInterface::class, function (ContainerInterface $c) {
154
+		$this->registerService(ContainerInterface::class, function(ContainerInterface $c) {
155 155
 			return $c;
156 156
 		});
157 157
 		$this->registerAlias(IAppContainer::class, ContainerInterface::class);
158 158
 
159 159
 		// commonly used attributes
160
-		$this->registerService('UserId', function (ContainerInterface $c) {
160
+		$this->registerService('UserId', function(ContainerInterface $c) {
161 161
 			return $c->get(IUserSession::class)->getSession()->get('user_id');
162 162
 		});
163 163
 
164
-		$this->registerService('WebRoot', function (ContainerInterface $c) {
164
+		$this->registerService('WebRoot', function(ContainerInterface $c) {
165 165
 			return $c->get(IServerContainer::class)->getWebRoot();
166 166
 		});
167 167
 
168
-		$this->registerService('OC_Defaults', function (ContainerInterface $c) {
168
+		$this->registerService('OC_Defaults', function(ContainerInterface $c) {
169 169
 			return $c->get(IServerContainer::class)->getThemingDefaults();
170 170
 		});
171 171
 
172
-		$this->registerService('Protocol', function (ContainerInterface $c) {
172
+		$this->registerService('Protocol', function(ContainerInterface $c) {
173 173
 			/** @var \OC\Server $server */
174 174
 			$server = $c->get(IServerContainer::class);
175 175
 			$protocol = $server->getRequest()->getHttpProtocol();
176 176
 			return new Http($_SERVER, $protocol);
177 177
 		});
178 178
 
179
-		$this->registerService('Dispatcher', function (ContainerInterface $c) {
179
+		$this->registerService('Dispatcher', function(ContainerInterface $c) {
180 180
 			return new Dispatcher(
181 181
 				$c->get('Protocol'),
182 182
 				$c->get(MiddlewareDispatcher::class),
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		 * Middleware
197 197
 		 */
198 198
 		$this->registerAlias('MiddlewareDispatcher', MiddlewareDispatcher::class);
199
-		$this->registerService(MiddlewareDispatcher::class, function (ContainerInterface $c) {
199
+		$this->registerService(MiddlewareDispatcher::class, function(ContainerInterface $c) {
200 200
 			$server = $this->getServer();
201 201
 
202 202
 			$dispatcher = new MiddlewareDispatcher();
@@ -312,13 +312,13 @@  discard block
 block discarded – undo
312 312
 			return $dispatcher;
313 313
 		});
314 314
 
315
-		$this->registerService(IAppConfig::class, function (ContainerInterface $c) {
315
+		$this->registerService(IAppConfig::class, function(ContainerInterface $c) {
316 316
 			return new OC\AppFramework\Services\AppConfig(
317 317
 				$c->get(IConfig::class),
318 318
 				$c->get('AppName')
319 319
 			);
320 320
 		});
321
-		$this->registerService(IInitialState::class, function (ContainerInterface $c) {
321
+		$this->registerService(IInitialState::class, function(ContainerInterface $c) {
322 322
 			return new OC\AppFramework\Services\InitialState(
323 323
 				$c->get(IInitialStateService::class),
324 324
 				$c->get('AppName')
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 	 * @param string $serviceName e.g. 'OCA\Files\Capabilities'
407 407
 	 */
408 408
 	public function registerCapability($serviceName) {
409
-		$this->query('OC\CapabilitiesManager')->registerCapability(function () use ($serviceName) {
409
+		$this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) {
410 410
 			return $this->query($serviceName);
411 411
 		});
412 412
 	}
@@ -452,11 +452,11 @@  discard block
 block discarded – undo
452 452
 			return parent::query($name);
453 453
 		} elseif ($this['AppName'] === 'core' && strpos($name, 'OC\\Core\\') === 0) {
454 454
 			return parent::query($name);
455
-		} elseif (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']) . '\\') === 0) {
455
+		} elseif (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']).'\\') === 0) {
456 456
 			return parent::query($name);
457 457
 		}
458 458
 
459
-		throw new QueryException('Could not resolve ' . $name . '!' .
459
+		throw new QueryException('Could not resolve '.$name.'!'.
460 460
 			' Class can not be instantiated', 1);
461 461
 	}
462 462
 }
Please login to merge, or discard this patch.