Passed
Push — master ( 32f79c...03cdff )
by Roeland
10:27 queued 11s
created
lib/private/AppFramework/Routing/RouteConfig.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		 * OCS routes go into a different collection
82 82
 		 */
83 83
 		$oldCollection = $this->router->getCurrentCollection();
84
-		$this->router->useCollection($oldCollection . '.ocs');
84
+		$this->router->useCollection($oldCollection.'.ocs');
85 85
 
86 86
 		// parse ocs simple routes
87 87
 		$this->processOCS($this->routes);
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 		foreach ($ocsRoutes as $ocsRoute) {
98 98
 			$name = $ocsRoute['name'];
99 99
 			$postfix = $ocsRoute['postfix'] ?? '';
100
-			$root = $ocsRoute['root'] ?? '/apps/' . $this->appName;
100
+			$root = $ocsRoute['root'] ?? '/apps/'.$this->appName;
101 101
 
102
-			$url = $root . $ocsRoute['url'];
102
+			$url = $root.$ocsRoute['url'];
103 103
 			$verb = strtoupper($ocsRoute['verb'] ?? 'GET');
104 104
 
105 105
 			$split = explode('#', $name, 2);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			$controllerName = $this->buildControllerName($controller);
112 112
 			$actionName = $this->buildActionName($action);
113 113
 
114
-			$routeName = 'ocs.' . $this->appName . '.' . $controller . '.' . $action . $postfix;
114
+			$routeName = 'ocs.'.$this->appName.'.'.$controller.'.'.$action.$postfix;
115 115
 
116 116
 			// register the route
117 117
 			$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
 
123 123
 			// optionally register requirements for route. This is used to
124 124
 			// tell the route parser how url parameters should be matched
125
-			if(array_key_exists('requirements', $ocsRoute)) {
125
+			if (array_key_exists('requirements', $ocsRoute)) {
126 126
 				$router->requirements($ocsRoute['requirements']);
127 127
 			}
128 128
 
129 129
 			// optionally register defaults for route. This is used to
130 130
 			// tell the route parser how url parameters should be default valued
131
-			if(array_key_exists('defaults', $ocsRoute)) {
131
+			if (array_key_exists('defaults', $ocsRoute)) {
132 132
 				$router->defaults($ocsRoute['defaults']);
133 133
 			}
134 134
 		}
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
 				} else if ($controllerName === 'RequesthandlerController') {
168 168
 					$controllerName = 'RequestHandlerController';
169 169
 				}
170
-				$controllerName = App::buildAppNamespace($appName) . '\\Controller\\' . $controllerName;
170
+				$controllerName = App::buildAppNamespace($appName).'\\Controller\\'.$controllerName;
171 171
 			}
172 172
 
173
-			$routeName = $appName . '.' . $controller . '.' . $action . $postfix;
173
+			$routeName = $appName.'.'.$controller.'.'.$action.$postfix;
174 174
 
175 175
 			// register the route
176 176
 			$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 
181 181
 			// optionally register requirements for route. This is used to
182 182
 			// tell the route parser how url parameters should be matched
183
-			if(array_key_exists('requirements', $simpleRoute)) {
183
+			if (array_key_exists('requirements', $simpleRoute)) {
184 184
 				$router->requirements($simpleRoute['requirements']);
185 185
 			}
186 186
 
187 187
 			// optionally register defaults for route. This is used to
188 188
 			// tell the route parser how url parameters should be default valued
189
-			if(array_key_exists('defaults', $simpleRoute)) {
189
+			if (array_key_exists('defaults', $simpleRoute)) {
190 190
 				$router->defaults($simpleRoute['defaults']);
191 191
 			}
192 192
 		}
@@ -214,11 +214,11 @@  discard block
 block discarded – undo
214 214
 
215 215
 		$resources = $routes['ocs-resources'] ?? [];
216 216
 		foreach ($resources as $resource => $config) {
217
-			$root = $config['root'] ?? '/apps/' . $this->appName;
217
+			$root = $config['root'] ?? '/apps/'.$this->appName;
218 218
 
219 219
 			// the url parameter used as id to the resource
220
-			foreach($actions as $action) {
221
-				$url = $root . $config['url'];
220
+			foreach ($actions as $action) {
221
+				$url = $root.$config['url'];
222 222
 				$method = $action['name'];
223 223
 				$verb = strtoupper($action['verb'] ?? 'GET');
224 224
 				$collectionAction = $action['on-collection'] ?? false;
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 					$url .= '/{id}';
227 227
 				}
228 228
 				if (isset($action['url-postfix'])) {
229
-					$url .= '/' . $action['url-postfix'];
229
+					$url .= '/'.$action['url-postfix'];
230 230
 				}
231 231
 
232 232
 				$controller = $resource;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 				$controllerName = $this->buildControllerName($controller);
235 235
 				$actionName = $this->buildActionName($method);
236 236
 
237
-				$routeName = 'ocs.' . $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
237
+				$routeName = 'ocs.'.$this->appName.'.'.strtolower($resource).'.'.strtolower($method);
238 238
 
239 239
 				$this->router->create($routeName, $url)->method($verb)->action(
240 240
 					new RouteActionHandler($this->container, $controllerName, $actionName)
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 		foreach ($resources as $resource => $config) {
268 268
 
269 269
 			// the url parameter used as id to the resource
270
-			foreach($actions as $action) {
270
+			foreach ($actions as $action) {
271 271
 				$url = $config['url'];
272 272
 				$method = $action['name'];
273 273
 				$verb = strtoupper($action['verb'] ?? 'GET');
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 					$url .= '/{id}';
277 277
 				}
278 278
 				if (isset($action['url-postfix'])) {
279
-					$url .= '/' . $action['url-postfix'];
279
+					$url .= '/'.$action['url-postfix'];
280 280
 				}
281 281
 
282 282
 				$controller = $resource;
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 				$controllerName = $this->buildControllerName($controller);
285 285
 				$actionName = $this->buildActionName($method);
286 286
 
287
-				$routeName = $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
287
+				$routeName = $this->appName.'.'.strtolower($resource).'.'.strtolower($method);
288 288
 
289 289
 				$this->router->create($routeName, $url)->method($verb)->action(
290 290
 					new RouteActionHandler($this->container, $controllerName, $actionName)
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	 */
301 301
 	private function buildControllerName(string $controller): string {
302 302
 		if (!isset($this->controllerNameCache[$controller])) {
303
-			$this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller';
303
+			$this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)).'Controller';
304 304
 		}
305 305
 		return $this->controllerNameCache[$controller];
306 306
 	}
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 		$pattern = '/_[a-z]?/';
324 324
 		return preg_replace_callback(
325 325
 			$pattern,
326
-			function ($matches) {
326
+			function($matches) {
327 327
 				return strtoupper(ltrim($matches[0], '_'));
328 328
 			},
329 329
 			$str);
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
 	public function castColumn($column, $type) {
40 40
 		switch ($type) {
41 41
 			case IQueryBuilder::PARAM_INT:
42
-				return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS INT)');
42
+				return new QueryFunction('CAST('.$this->helper->quoteColumnName($column).' AS INT)');
43 43
 			case IQueryBuilder::PARAM_STR:
44
-				return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS TEXT)');
44
+				return new QueryFunction('CAST('.$this->helper->quoteColumnName($column).' AS TEXT)');
45 45
 			default:
46 46
 				return parent::castColumn($column, $type);
47 47
 		}
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Node.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
 		// verify path of the target
137 137
 		$this->verifyPath();
138 138
 
139
-		$newPath = $parentPath . '/' . $newName;
139
+		$newPath = $parentPath.'/'.$newName;
140 140
 
141 141
 		if (!$this->fileView->rename($this->path, $newPath)) {
142
-			throw new \Sabre\DAV\Exception('Failed to rename '. $this->path . ' to ' . $newPath);
142
+			throw new \Sabre\DAV\Exception('Failed to rename '.$this->path.' to '.$newPath);
143 143
 		}
144 144
 
145 145
 		$this->path = $newPath;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	public function getLastModified() {
160 160
 		$timestamp = $this->info->getMtime();
161 161
 		if (!empty($timestamp)) {
162
-			return (int)$timestamp;
162
+			return (int) $timestamp;
163 163
 		}
164 164
 		return $timestamp;
165 165
 	}
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @return string
188 188
 	 */
189 189
 	public function getETag() {
190
-		return '"' . $this->info->getEtag() . '"';
190
+		return '"'.$this->info->getEtag().'"';
191 191
 	}
192 192
 
193 193
 	/**
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		if ($this->info->getId()) {
227 227
 			$instanceId = \OC_Util::getInstanceId();
228 228
 			$id = sprintf('%08d', $this->info->getId());
229
-			return $id . $instanceId;
229
+			return $id.$instanceId;
230 230
 		}
231 231
 
232 232
 		return null;
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
 		if ($storage && $storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) {
265 265
 			/** @var \OCA\Files_Sharing\SharedStorage $storage */
266
-			$permissions = (int)$storage->getShare()->getPermissions();
266
+			$permissions = (int) $storage->getShare()->getPermissions();
267 267
 		} else {
268 268
 			$permissions = $this->info->getPermissions();
269 269
 		}
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 			$shares = $this->shareManager->getSharedWith($user, $shareType, $this, -1);
315 315
 			foreach ($shares as $share) {
316 316
 				$note = $share->getNote();
317
-				if($share->getShareOwner() !== $user && !empty($note)) {
317
+				if ($share->getShareOwner() !== $user && !empty($note)) {
318 318
 					return $note;
319 319
 				}
320 320
 			}
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			throw new \InvalidArgumentException('X-OC-MTime header must be an integer (unix timestamp).');
406 406
 		}
407 407
 
408
-		return (int)$mtimeFromRequest;
408
+		return (int) $mtimeFromRequest;
409 409
 	}
410 410
 
411 411
 }
Please login to merge, or discard this patch.
apps/dav/lib/Upload/AssemblyStream.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
 
73 73
 		$nodes = $this->nodes;
74 74
 		// http://stackoverflow.com/a/10985500
75
-		@usort($nodes, function (IFile $a, IFile $b) {
75
+		@usort($nodes, function(IFile $a, IFile $b) {
76 76
 			return strnatcmp($a->getName(), $b->getName());
77 77
 		});
78 78
 		$this->nodes = array_values($nodes);
79
-		$this->size = array_reduce($this->nodes, function ($size, IFile $file) {
79
+		$this->size = array_reduce($this->nodes, function($size, IFile $file) {
80 80
 			return $size + $file->getSize();
81 81
 		}, 0);
82 82
 		return true;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 		$stream = $this->getStream($this->nodes[$nodeIndex]);
116 116
 		$nodeOffset = $offset - $nodeStart;
117
-		if(fseek($stream, $nodeOffset) === -1) {
117
+		if (fseek($stream, $nodeOffset) === -1) {
118 118
 			return false;
119 119
 		}
120 120
 		$this->currentNode = $nodeIndex;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 				fclose($this->currentStream);
155 155
 				$currentNodeSize = $this->nodes[$this->currentNode]->getSize();
156 156
 				if ($this->currentNodeRead < $currentNodeSize) {
157
-					throw new \Exception('Stream from assembly node shorter than expected, got ' . $this->currentNodeRead . ' bytes, expected ' . $currentNodeSize);
157
+					throw new \Exception('Stream from assembly node shorter than expected, got '.$this->currentNodeRead.' bytes, expected '.$currentNodeSize);
158 158
 				}
159 159
 				$this->currentNode++;
160 160
 				$this->currentNodeRead = 0;
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 		if (isset($context[$name])) {
252 252
 			$context = $context[$name];
253 253
 		} else {
254
-			throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
254
+			throw new \BadMethodCallException('Invalid context, "'.$name.'" options not set');
255 255
 		}
256 256
 		if (isset($context['nodes']) and is_array($context['nodes'])) {
257 257
 			$this->nodes = $context['nodes'];
Please login to merge, or discard this patch.
apps/files_external/lib/Command/Notify.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			return 1;
129 129
 		}
130 130
 		if (!$storage instanceof INotifyStorage) {
131
-			$output->writeln('<error>Mount of type "' . $mount->getBackend()->getText() . '" does not support active update notifications</error>');
131
+			$output->writeln('<error>Mount of type "'.$mount->getBackend()->getText().'" does not support active update notifications</error>');
132 132
 			return 1;
133 133
 		}
134 134
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		$path = trim($input->getOption('path'), '/');
138 138
 		$notifyHandler = $storage->notify($path);
139 139
 		$this->selfTest($storage, $notifyHandler, $verbose, $output);
140
-		$notifyHandler->listen(function (IChange $change) use ($mount, $verbose, $output) {
140
+		$notifyHandler->listen(function(IChange $change) use ($mount, $verbose, $output) {
141 141
 			if ($verbose) {
142 142
 				$this->logUpdate($change, $output);
143 143
 			}
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
 			$storageIds = $this->getStorageIds($mountId);
169 169
 		}
170 170
 		if (count($storageIds) === 0) {
171
-			throw new StorageNotAvailableException('No storages found by mount ID ' . $mountId);
171
+			throw new StorageNotAvailableException('No storages found by mount ID '.$mountId);
172 172
 		}
173 173
 		$storageIds = array_map('intval', $storageIds);
174 174
 
175 175
 		$result = $this->updateParent($storageIds, $parent);
176 176
 		if ($result === 0) {
177 177
 			//TODO: Find existing parent further up the tree in the database and register that folder instead.
178
-			$this->logger->info('Failed updating parent for "' . $path . '" while trying to register change. It may not exist in the filecache.');
178
+			$this->logger->info('Failed updating parent for "'.$path.'" while trying to register change. It may not exist in the filecache.');
179 179
 		}
180 180
 	}
181 181
 
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
 				return;
198 198
 		}
199 199
 
200
-		$text .= ' ' . $change->getPath();
200
+		$text .= ' '.$change->getPath();
201 201
 		if ($change instanceof IRenameChange) {
202
-			$text .= ' to ' . $change->getTargetPath();
202
+			$text .= ' to '.$change->getTargetPath();
203 203
 		}
204 204
 
205 205
 		$output->writeln($text);
Please login to merge, or discard this patch.
lib/private/Files/View.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 			$path = '/';
129 129
 		}
130 130
 		if ($path[0] !== '/') {
131
-			$path = '/' . $path;
131
+			$path = '/'.$path;
132 132
 		}
133
-		return $this->fakeRoot . $path;
133
+		return $this->fakeRoot.$path;
134 134
 	}
135 135
 
136 136
 	/**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	public function chroot($fakeRoot) {
143 143
 		if (!$fakeRoot == '') {
144 144
 			if ($fakeRoot[0] !== '/') {
145
-				$fakeRoot = '/' . $fakeRoot;
145
+				$fakeRoot = '/'.$fakeRoot;
146 146
 			}
147 147
 		}
148 148
 		$this->fakeRoot = $fakeRoot;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		}
175 175
 
176 176
 		// missing slashes can cause wrong matches!
177
-		$root = rtrim($this->fakeRoot, '/') . '/';
177
+		$root = rtrim($this->fakeRoot, '/').'/';
178 178
 
179 179
 		if (strpos($path, $root) !== 0) {
180 180
 			return null;
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 		if ($mount instanceof MoveableMount) {
281 281
 			// cut of /user/files to get the relative path to data/user/files
282 282
 			$pathParts = explode('/', $path, 4);
283
-			$relPath = '/' . $pathParts[3];
283
+			$relPath = '/'.$pathParts[3];
284 284
 			$this->lockFile($relPath, ILockingProvider::LOCK_SHARED, true);
285 285
 			\OC_Hook::emit(
286 286
 				Filesystem::CLASSNAME, "umount",
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 		}
701 701
 		$postFix = (substr($path, -1) === '/') ? '/' : '';
702 702
 		$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
703
-		$mount = Filesystem::getMountManager()->find($absolutePath . $postFix);
703
+		$mount = Filesystem::getMountManager()->find($absolutePath.$postFix);
704 704
 		if ($mount and $mount->getInternalPath($absolutePath) === '') {
705 705
 			return $this->removeMount($mount, $absolutePath);
706 706
 		}
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
 								$this->renameUpdate($storage1, $storage2, $internalPath1, $internalPath2);
822 822
 							}
823 823
 						}
824
-					} catch(\Exception $e) {
824
+					} catch (\Exception $e) {
825 825
 						throw $e;
826 826
 					} finally {
827 827
 						$this->changeLock($path1, ILockingProvider::LOCK_SHARED, true);
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 						}
846 846
 					}
847 847
 				}
848
-			} catch(\Exception $e) {
848
+			} catch (\Exception $e) {
849 849
 				throw $e;
850 850
 			} finally {
851 851
 				$this->unlockFile($path1, ILockingProvider::LOCK_SHARED, true);
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
 				$hooks[] = 'write';
979 979
 				break;
980 980
 			default:
981
-				\OCP\Util::writeLog('core', 'invalid mode (' . $mode . ') for ' . $path, ILogger::ERROR);
981
+				\OCP\Util::writeLog('core', 'invalid mode ('.$mode.') for '.$path, ILogger::ERROR);
982 982
 		}
983 983
 
984 984
 		if ($mode !== 'r' && $mode !== 'w') {
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
 					array(Filesystem::signal_param_path => $this->getHookPath($path))
1083 1083
 				);
1084 1084
 			}
1085
-			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
1085
+			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath.$postFix);
1086 1086
 			if ($storage) {
1087 1087
 				return $storage->hash($type, $internalPath, $raw);
1088 1088
 			}
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 
1137 1137
 			$run = $this->runHooks($hooks, $path);
1138 1138
 			/** @var \OC\Files\Storage\Storage $storage */
1139
-			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath . $postFix);
1139
+			list($storage, $internalPath) = Filesystem::resolvePath($absolutePath.$postFix);
1140 1140
 			if ($run and $storage) {
1141 1141
 				if (in_array('write', $hooks) || in_array('delete', $hooks)) {
1142 1142
 					try {
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 				if ($result && in_array('delete', $hooks) and $result) {
1166 1166
 					$this->removeUpdate($storage, $internalPath);
1167 1167
 				}
1168
-				if ($result && in_array('write', $hooks,  true) && $operation !== 'fopen' && $operation !== 'touch') {
1168
+				if ($result && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') {
1169 1169
 					$this->writeUpdate($storage, $internalPath);
1170 1170
 				}
1171 1171
 				if ($result && in_array('touch', $hooks)) {
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 					$unlockLater = true;
1182 1182
 					// make sure our unlocking callback will still be called if connection is aborted
1183 1183
 					ignore_user_abort(true);
1184
-					$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
1184
+					$result = CallbackWrapper::wrap($result, null, null, function() use ($hooks, $path) {
1185 1185
 						if (in_array('write', $hooks)) {
1186 1186
 							$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
1187 1187
 						} else if (in_array('read', $hooks)) {
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 			return true;
1243 1243
 		}
1244 1244
 
1245
-		return (strlen($fullPath) > strlen($defaultRoot)) && (substr($fullPath, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/');
1245
+		return (strlen($fullPath) > strlen($defaultRoot)) && (substr($fullPath, 0, strlen($defaultRoot) + 1) === $defaultRoot.'/');
1246 1246
 	}
1247 1247
 
1248 1248
 	/**
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
 				if ($hook != 'read') {
1262 1262
 					\OC_Hook::emit(
1263 1263
 						Filesystem::CLASSNAME,
1264
-						$prefix . $hook,
1264
+						$prefix.$hook,
1265 1265
 						array(
1266 1266
 							Filesystem::signal_param_run => &$run,
1267 1267
 							Filesystem::signal_param_path => $path
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
 				} elseif (!$post) {
1271 1271
 					\OC_Hook::emit(
1272 1272
 						Filesystem::CLASSNAME,
1273
-						$prefix . $hook,
1273
+						$prefix.$hook,
1274 1274
 						array(
1275 1275
 							Filesystem::signal_param_path => $path
1276 1276
 						)
@@ -1363,11 +1363,11 @@  discard block
 block discarded – undo
1363 1363
 			return $this->getPartFileInfo($path);
1364 1364
 		}
1365 1365
 		$relativePath = $path;
1366
-		$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
1366
+		$path = Filesystem::normalizePath($this->fakeRoot.'/'.$path);
1367 1367
 
1368 1368
 		$mount = Filesystem::getMountManager()->find($path);
1369 1369
 		if (!$mount) {
1370
-			\OC::$server->getLogger()->warning('Mountpoint not found for path: ' . $path);
1370
+			\OC::$server->getLogger()->warning('Mountpoint not found for path: '.$path);
1371 1371
 			return false;
1372 1372
 		}
1373 1373
 		$storage = $mount->getStorage();
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
 					//add the sizes of other mount points to the folder
1396 1396
 					$extOnly = ($includeMountPoints === 'ext');
1397 1397
 					$mounts = Filesystem::getMountManager()->findIn($path);
1398
-					$info->setSubMounts(array_filter($mounts, function (IMountPoint $mount) use ($extOnly) {
1398
+					$info->setSubMounts(array_filter($mounts, function(IMountPoint $mount) use ($extOnly) {
1399 1399
 						$subStorage = $mount->getStorage();
1400 1400
 						return !($extOnly && $subStorage instanceof \OCA\Files_Sharing\SharedStorage);
1401 1401
 					}));
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
 
1405 1405
 			return $info;
1406 1406
 		} else {
1407
-			\OC::$server->getLogger()->warning('Storage not valid for mountpoint: ' . $mount->getMountPoint());
1407
+			\OC::$server->getLogger()->warning('Storage not valid for mountpoint: '.$mount->getMountPoint());
1408 1408
 		}
1409 1409
 
1410 1410
 		return false;
@@ -1451,12 +1451,12 @@  discard block
 block discarded – undo
1451 1451
 			/**
1452 1452
 			 * @var \OC\Files\FileInfo[] $fileInfos
1453 1453
 			 */
1454
-			$fileInfos = array_map(function (ICacheEntry $content) use ($path, $storage, $mount, $sharingDisabled) {
1454
+			$fileInfos = array_map(function(ICacheEntry $content) use ($path, $storage, $mount, $sharingDisabled) {
1455 1455
 				if ($sharingDisabled) {
1456 1456
 					$content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE;
1457 1457
 				}
1458 1458
 				$owner = $this->getUserObjectForOwner($storage->getOwner($content['path']));
1459
-				return new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content, $mount, $owner);
1459
+				return new FileInfo($path.'/'.$content['name'], $storage, $content['path'], $content, $mount, $owner);
1460 1460
 			}, $contents);
1461 1461
 			$files = array_combine($fileNames, $fileInfos);
1462 1462
 
@@ -1481,7 +1481,7 @@  discard block
 block discarded – undo
1481 1481
 						} catch (\Exception $e) {
1482 1482
 							// sometimes when the storage is not available it can be any exception
1483 1483
 							\OC::$server->getLogger()->logException($e, [
1484
-								'message' => 'Exception while scanning storage "' . $subStorage->getId() . '"',
1484
+								'message' => 'Exception while scanning storage "'.$subStorage->getId().'"',
1485 1485
 								'level' => ILogger::ERROR,
1486 1486
 								'app' => 'lib',
1487 1487
 							]);
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
 								$rootEntry['permissions'] = $permissions & (\OCP\Constants::PERMISSION_ALL - (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE));
1513 1513
 							}
1514 1514
 
1515
-							$rootEntry['path'] = substr(Filesystem::normalizePath($path . '/' . $rootEntry['name']), strlen($user) + 2); // full path without /$user/
1515
+							$rootEntry['path'] = substr(Filesystem::normalizePath($path.'/'.$rootEntry['name']), strlen($user) + 2); // full path without /$user/
1516 1516
 
1517 1517
 							// if sharing was disabled for the user we remove the share permissions
1518 1518
 							if (\OCP\Util::isSharingDisabledForUser()) {
@@ -1520,14 +1520,14 @@  discard block
 block discarded – undo
1520 1520
 							}
1521 1521
 
1522 1522
 							$owner = $this->getUserObjectForOwner($subStorage->getOwner(''));
1523
-							$files[$rootEntry->getName()] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry, $mount, $owner);
1523
+							$files[$rootEntry->getName()] = new FileInfo($path.'/'.$rootEntry['name'], $subStorage, '', $rootEntry, $mount, $owner);
1524 1524
 						}
1525 1525
 					}
1526 1526
 				}
1527 1527
 			}
1528 1528
 
1529 1529
 			if ($mimetype_filter) {
1530
-				$files = array_filter($files, function (FileInfo $file) use ($mimetype_filter) {
1530
+				$files = array_filter($files, function(FileInfo $file) use ($mimetype_filter) {
1531 1531
 					if (strpos($mimetype_filter, '/')) {
1532 1532
 						return $file->getMimetype() === $mimetype_filter;
1533 1533
 					} else {
@@ -1556,7 +1556,7 @@  discard block
 block discarded – undo
1556 1556
 		if ($data instanceof FileInfo) {
1557 1557
 			$data = $data->getData();
1558 1558
 		}
1559
-		$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
1559
+		$path = Filesystem::normalizePath($this->fakeRoot.'/'.$path);
1560 1560
 		/**
1561 1561
 		 * @var \OC\Files\Storage\Storage $storage
1562 1562
 		 * @var string $internalPath
@@ -1583,7 +1583,7 @@  discard block
 block discarded – undo
1583 1583
 	 * @return FileInfo[]
1584 1584
 	 */
1585 1585
 	public function search($query) {
1586
-		return $this->searchCommon('search', array('%' . $query . '%'));
1586
+		return $this->searchCommon('search', array('%'.$query.'%'));
1587 1587
 	}
1588 1588
 
1589 1589
 	/**
@@ -1634,10 +1634,10 @@  discard block
 block discarded – undo
1634 1634
 
1635 1635
 			$results = call_user_func_array(array($cache, $method), $args);
1636 1636
 			foreach ($results as $result) {
1637
-				if (substr($mountPoint . $result['path'], 0, $rootLength + 1) === $this->fakeRoot . '/') {
1637
+				if (substr($mountPoint.$result['path'], 0, $rootLength + 1) === $this->fakeRoot.'/') {
1638 1638
 					$internalPath = $result['path'];
1639
-					$path = $mountPoint . $result['path'];
1640
-					$result['path'] = substr($mountPoint . $result['path'], $rootLength);
1639
+					$path = $mountPoint.$result['path'];
1640
+					$result['path'] = substr($mountPoint.$result['path'], $rootLength);
1641 1641
 					$owner = \OC::$server->getUserManager()->get($storage->getOwner($internalPath));
1642 1642
 					$files[] = new FileInfo($path, $storage, $internalPath, $result, $mount, $owner);
1643 1643
 				}
@@ -1655,8 +1655,8 @@  discard block
 block discarded – undo
1655 1655
 					if ($results) {
1656 1656
 						foreach ($results as $result) {
1657 1657
 							$internalPath = $result['path'];
1658
-							$result['path'] = rtrim($relativeMountPoint . $result['path'], '/');
1659
-							$path = rtrim($mountPoint . $internalPath, '/');
1658
+							$result['path'] = rtrim($relativeMountPoint.$result['path'], '/');
1659
+							$path = rtrim($mountPoint.$internalPath, '/');
1660 1660
 							$owner = \OC::$server->getUserManager()->get($storage->getOwner($internalPath));
1661 1661
 							$files[] = new FileInfo($path, $storage, $internalPath, $result, $mount, $owner);
1662 1662
 						}
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
 	public function getOwner($path) {
1678 1678
 		$info = $this->getFileInfo($path);
1679 1679
 		if (!$info) {
1680
-			throw new NotFoundException($path . ' not found while trying to get owner');
1680
+			throw new NotFoundException($path.' not found while trying to get owner');
1681 1681
 		}
1682 1682
 		return $info->getOwner()->getUID();
1683 1683
 	}
@@ -1711,7 +1711,7 @@  discard block
 block discarded – undo
1711 1711
 	 * @return string
1712 1712
 	 */
1713 1713
 	public function getPath($id) {
1714
-		$id = (int)$id;
1714
+		$id = (int) $id;
1715 1715
 		$manager = Filesystem::getMountManager();
1716 1716
 		$mounts = $manager->findIn($this->fakeRoot);
1717 1717
 		$mounts[] = $manager->find($this->fakeRoot);
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
 				$cache = $mount->getStorage()->getCache();
1727 1727
 				$internalPath = $cache->getPathById($id);
1728 1728
 				if (is_string($internalPath)) {
1729
-					$fullPath = $mount->getMountPoint() . $internalPath;
1729
+					$fullPath = $mount->getMountPoint().$internalPath;
1730 1730
 					if (!is_null($path = $this->getRelativePath($fullPath))) {
1731 1731
 						return $path;
1732 1732
 					}
@@ -1762,10 +1762,10 @@  discard block
 block discarded – undo
1762 1762
 	private function targetIsNotShared(IStorage $targetStorage, string $targetInternalPath) {
1763 1763
 
1764 1764
 		// note: cannot use the view because the target is already locked
1765
-		$fileId = (int)$targetStorage->getCache()->getId($targetInternalPath);
1765
+		$fileId = (int) $targetStorage->getCache()->getId($targetInternalPath);
1766 1766
 		if ($fileId === -1) {
1767 1767
 			// target might not exist, need to check parent instead
1768
-			$fileId = (int)$targetStorage->getCache()->getId(dirname($targetInternalPath));
1768
+			$fileId = (int) $targetStorage->getCache()->getId(dirname($targetInternalPath));
1769 1769
 		}
1770 1770
 
1771 1771
 		// check if any of the parents were shared by the current owner (include collections)
@@ -1865,7 +1865,7 @@  discard block
 block discarded – undo
1865 1865
 		$resultPath = '';
1866 1866
 		foreach ($parts as $part) {
1867 1867
 			if ($part) {
1868
-				$resultPath .= '/' . $part;
1868
+				$resultPath .= '/'.$part;
1869 1869
 				$result[] = $resultPath;
1870 1870
 			}
1871 1871
 		}
@@ -2128,16 +2128,16 @@  discard block
 block discarded – undo
2128 2128
 	public function getUidAndFilename($filename) {
2129 2129
 		$info = $this->getFileInfo($filename);
2130 2130
 		if (!$info instanceof \OCP\Files\FileInfo) {
2131
-			throw new NotFoundException($this->getAbsolutePath($filename) . ' not found');
2131
+			throw new NotFoundException($this->getAbsolutePath($filename).' not found');
2132 2132
 		}
2133 2133
 		$uid = $info->getOwner()->getUID();
2134 2134
 		if ($uid != \OCP\User::getUser()) {
2135 2135
 			Filesystem::initMountPoints($uid);
2136
-			$ownerView = new View('/' . $uid . '/files');
2136
+			$ownerView = new View('/'.$uid.'/files');
2137 2137
 			try {
2138 2138
 				$filename = $ownerView->getPath($info['fileid']);
2139 2139
 			} catch (NotFoundException $e) {
2140
-				throw new NotFoundException('File with id ' . $info['fileid'] . ' not found for user ' . $uid);
2140
+				throw new NotFoundException('File with id '.$info['fileid'].' not found for user '.$uid);
2141 2141
 			}
2142 2142
 		}
2143 2143
 		return [$uid, $filename];
@@ -2154,7 +2154,7 @@  discard block
 block discarded – undo
2154 2154
 		$directoryParts = array_filter($directoryParts);
2155 2155
 		foreach ($directoryParts as $key => $part) {
2156 2156
 			$currentPathElements = array_slice($directoryParts, 0, $key);
2157
-			$currentPath = '/' . implode('/', $currentPathElements);
2157
+			$currentPath = '/'.implode('/', $currentPathElements);
2158 2158
 			if ($this->is_file($currentPath)) {
2159 2159
 				return false;
2160 2160
 			}
Please login to merge, or discard this patch.
lib/private/App/DependencyAnalyzer.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
 		if (isset($dependencies['php']['@attributes']['min-version'])) {
156 156
 			$minVersion = $dependencies['php']['@attributes']['min-version'];
157 157
 			if ($this->compareSmaller($this->platform->getPhpVersion(), $minVersion)) {
158
-				$missing[] = (string)$this->l->t('PHP %s or higher is required.', [$minVersion]);
158
+				$missing[] = (string) $this->l->t('PHP %s or higher is required.', [$minVersion]);
159 159
 			}
160 160
 		}
161 161
 		if (isset($dependencies['php']['@attributes']['max-version'])) {
162 162
 			$maxVersion = $dependencies['php']['@attributes']['max-version'];
163 163
 			if ($this->compareBigger($this->platform->getPhpVersion(), $maxVersion)) {
164
-				$missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
164
+				$missing[] = (string) $this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
165 165
 			}
166 166
 		}
167 167
 		if (isset($dependencies['php']['@attributes']['min-int-size'])) {
168 168
 			$intSize = $dependencies['php']['@attributes']['min-int-size'];
169
-			if ($intSize > $this->platform->getIntSize()*8) {
170
-				$missing[] = (string)$this->l->t('%sbit or higher PHP required.', [$intSize]);
169
+			if ($intSize > $this->platform->getIntSize() * 8) {
170
+				$missing[] = (string) $this->l->t('%sbit or higher PHP required.', [$intSize]);
171 171
 			}
172 172
 		}
173 173
 		return $missing;
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
 		if (!is_array($supportedDatabases)) {
191 191
 			$supportedDatabases = array($supportedDatabases);
192 192
 		}
193
-		$supportedDatabases = array_map(function ($db) {
193
+		$supportedDatabases = array_map(function($db) {
194 194
 			return $this->getValue($db);
195 195
 		}, $supportedDatabases);
196 196
 		$currentDatabase = $this->platform->getDatabase();
197 197
 		if (!in_array($currentDatabase, $supportedDatabases)) {
198
-			$missing[] = (string)$this->l->t('Following databases are supported: %s', [implode(', ', $supportedDatabases)]);
198
+			$missing[] = (string) $this->l->t('Following databases are supported: %s', [implode(', ', $supportedDatabases)]);
199 199
 		}
200 200
 		return $missing;
201 201
 	}
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 			}
225 225
 			$commandName = $this->getValue($command);
226 226
 			if (!$this->platform->isCommandKnown($commandName)) {
227
-				$missing[] = (string)$this->l->t('The command line tool %s could not be found', [$commandName]);
227
+				$missing[] = (string) $this->l->t('The command line tool %s could not be found', [$commandName]);
228 228
 			}
229 229
 		}
230 230
 		return $missing;
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 			return $missing;
291 291
 		}
292 292
 		if (is_array($oss)) {
293
-			$oss = array_map(function ($os) {
293
+			$oss = array_map(function($os) {
294 294
 				return $this->getValue($os);
295 295
 			}, $oss);
296 296
 		} else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 		}
299 299
 		$currentOS = $this->platform->getOS();
300 300
 		if (!in_array($currentOS, $oss)) {
301
-			$missing[] = (string)$this->l->t('Following platforms are supported: %s', [implode(', ', $oss)]);
301
+			$missing[] = (string) $this->l->t('Following platforms are supported: %s', [implode(', ', $oss)]);
302 302
 		}
303 303
 		return $missing;
304 304
 	}
@@ -324,12 +324,12 @@  discard block
 block discarded – undo
324 324
 
325 325
 		if (!is_null($minVersion)) {
326 326
 			if ($this->compareSmaller($this->platform->getOcVersion(), $minVersion)) {
327
-				$missing[] = (string)$this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
327
+				$missing[] = (string) $this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
328 328
 			}
329 329
 		}
330 330
 		if (!$ignoreMax && !is_null($maxVersion)) {
331 331
 			if ($this->compareBigger($this->platform->getOcVersion(), $maxVersion)) {
332
-				$missing[] = (string)$this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
332
+				$missing[] = (string) $this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
333 333
 			}
334 334
 		}
335 335
 		return $missing;
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 				return '10';
362 362
 			default:
363 363
 				if (strpos($version, '9.1.') === 0) {
364
-					$version = '10.0.' . substr($version, 4);
364
+					$version = '10.0.'.substr($version, 4);
365 365
 				}
366 366
 				return $version;
367 367
 		}
@@ -375,6 +375,6 @@  discard block
 block discarded – undo
375 375
 		if (isset($element['@value'])) {
376 376
 			return $element['@value'];
377 377
 		}
378
-		return (string)$element;
378
+		return (string) $element;
379 379
 	}
380 380
 }
Please login to merge, or discard this patch.
lib/public/IDBConnection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
  */
47 47
 interface IDBConnection {
48 48
 
49
-	const ADD_MISSING_INDEXES_EVENT = self::class . '::ADD_MISSING_INDEXES';
50
-	const CHECK_MISSING_INDEXES_EVENT = self::class . '::CHECK_MISSING_INDEXES';
49
+	const ADD_MISSING_INDEXES_EVENT = self::class.'::ADD_MISSING_INDEXES';
50
+	const CHECK_MISSING_INDEXES_EVENT = self::class.'::CHECK_MISSING_INDEXES';
51 51
 
52 52
 	/**
53 53
 	 * Gets the QueryBuilder for the connection.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
66 66
 	 * @since 6.0.0
67 67
 	 */
68
-	public function prepare($sql, $limit=null, $offset=null);
68
+	public function prepare($sql, $limit = null, $offset = null);
69 69
 
70 70
 	/**
71 71
 	 * Executes an, optionally parameterized, SQL query.
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * @return int number of inserted rows
133 133
 	 * @since 16.0.0
134 134
 	 */
135
-	public function insertIgnoreConflict(string $table,array $values) : int;
135
+	public function insertIgnoreConflict(string $table, array $values) : int;
136 136
 
137 137
 	/**
138 138
 	 * Insert or update a row value
Please login to merge, or discard this patch.
lib/private/DB/Adapter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function lockTable($tableName) {
70 70
 		$this->conn->beginTransaction();
71
-		$this->conn->executeUpdate('LOCK TABLE `' .$tableName . '` IN EXCLUSIVE MODE');
71
+		$this->conn->executeUpdate('LOCK TABLE `'.$tableName.'` IN EXCLUSIVE MODE');
72 72
 	}
73 73
 
74 74
 	/**
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 		if (empty($compare)) {
99 99
 			$compare = array_keys($input);
100 100
 		}
101
-		$query = 'INSERT INTO `' .$table . '` (`'
102
-			. implode('`,`', array_keys($input)) . '`) SELECT '
103
-			. str_repeat('?,', count($input)-1).'? ' // Is there a prettier alternative?
104
-			. 'FROM `' . $table . '` WHERE ';
101
+		$query = 'INSERT INTO `'.$table.'` (`'
102
+			. implode('`,`', array_keys($input)).'`) SELECT '
103
+			. str_repeat('?,', count($input) - 1).'? ' // Is there a prettier alternative?
104
+			. 'FROM `'.$table.'` WHERE ';
105 105
 
106 106
 		$inserts = array_values($input);
107
-		foreach($compare as $key) {
108
-			$query .= '`' . $key . '`';
107
+		foreach ($compare as $key) {
108
+			$query .= '`'.$key.'`';
109 109
 			if (is_null($input[$key])) {
110 110
 				$query .= ' IS NULL AND ';
111 111
 			} else {
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
 	/**
131 131
 	 * @suppress SqlInjectionChecker
132 132
 	 */
133
-	public function insertIgnoreConflict(string $table,array $values) : int {
133
+	public function insertIgnoreConflict(string $table, array $values) : int {
134 134
 		try {
135 135
 			$builder = $this->conn->getQueryBuilder();
136 136
 			$builder->insert($table);
137
-			foreach($values as $key => $value) {
137
+			foreach ($values as $key => $value) {
138 138
 				$builder->setValue($key, $builder->createNamedParameter($value));
139 139
 			}
140 140
 			return $builder->execute();
141
-		} catch(UniqueConstraintViolationException $e) {
141
+		} catch (UniqueConstraintViolationException $e) {
142 142
 			return 0;
143 143
 		}
144 144
 	}
Please login to merge, or discard this patch.