Completed
Push — master ( 54b1f4...fdc61e )
by Christoph
34:11 queued 21:41
created
apps/dav/lib/Upload/AssemblyStream.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 
67 67
 		$nodes = $this->nodes;
68 68
 		// http://stackoverflow.com/a/10985500
69
-		@usort($nodes, function (IFile $a, IFile $b) {
69
+		@usort($nodes, function(IFile $a, IFile $b) {
70 70
 			return strnatcmp($a->getName(), $b->getName());
71 71
 		});
72 72
 		$this->nodes = array_values($nodes);
73 73
 		if (count($this->nodes) > 0) {
74 74
 			$this->currentStream = $this->getStream($this->nodes[0]);
75 75
 		}
76
-		$this->size = array_reduce($this->nodes, function ($size, IFile $file) {
76
+		$this->size = array_reduce($this->nodes, function($size, IFile $file) {
77 77
 			return $size + $file->getSize();
78 78
 		}, 0);
79 79
 		return true;
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		if (isset($context[$name])) {
203 203
 			$context = $context[$name];
204 204
 		} else {
205
-			throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
205
+			throw new \BadMethodCallException('Invalid context, "'.$name.'" options not set');
206 206
 		}
207 207
 		if (isset($context['nodes']) and is_array($context['nodes'])) {
208 208
 			$this->nodes = $context['nodes'];
Please login to merge, or discard this patch.
core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 		$appName = $input->getArgument('app');
61 61
 		$version = $input->getArgument('version');
62 62
 
63
-		if (!preg_match('/^\d{1,16}$/',$version)) {
63
+		if (!preg_match('/^\d{1,16}$/', $version)) {
64 64
 			$output->writeln('<error>The given version is invalid. Only 0-9 are allowed (max. 16 digits)</error>');
65 65
 			return 1;
66 66
 		}
67 67
 
68
-		$schemaFile = $this->appManager->getAppPath($appName) . '/appinfo/database.xml';
68
+		$schemaFile = $this->appManager->getAppPath($appName).'/appinfo/database.xml';
69 69
 		if (!file_exists($schemaFile)) {
70
-			$output->writeln('<error>App ' . $appName . ' does not have a database.xml file</error>');
70
+			$output->writeln('<error>App '.$appName.' does not have a database.xml file</error>');
71 71
 			return 2;
72 72
 		}
73 73
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		$ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output));
81 81
 
82 82
 		$date = date('YmdHis');
83
-		$path = $this->generateMigration($ms, 'Version' . $version . 'Date' . $date, $schemaBody);
83
+		$path = $this->generateMigration($ms, 'Version'.$version.'Date'.$date, $schemaBody);
84 84
 
85 85
 		$output->writeln("New migration class has been generated to <info>$path</info>");
86 86
 		return 0;
Please login to merge, or discard this patch.
lib/public/AppFramework/Controller.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 		// default responders
79 79
 		$this->responders = array(
80
-			'json' => function ($data) {
80
+			'json' => function($data) {
81 81
 				if ($data instanceof DataResponse) {
82 82
 					$response = new JSONResponse(
83 83
 						$data->getData(),
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 * @since 7.0.0
107 107
 	 * @since 9.1.0 Added default parameter
108 108
 	 */
109
-	public function getResponderByHTTPHeader($acceptHeader, $default='json') {
109
+	public function getResponderByHTTPHeader($acceptHeader, $default = 'json') {
110 110
 		$headers = explode(',', $acceptHeader);
111 111
 
112 112
 		// return the first matching responder
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 	 * @return Response
146 146
 	 * @since 7.0.0
147 147
 	 */
148
-	public function buildResponse($response, $format='json') {
149
-		if(array_key_exists($format, $this->responders)) {
148
+	public function buildResponse($response, $format = 'json') {
149
+		if (array_key_exists($format, $this->responders)) {
150 150
 
151 151
 			$responder = $this->responders[$format];
152 152
 
@@ -154,6 +154,6 @@  discard block
 block discarded – undo
154 154
 
155 155
 		}
156 156
 		throw new \DomainException('No responder registered for format '.
157
-			$format . '!');
157
+			$format.'!');
158 158
 	}
159 159
 }
Please login to merge, or discard this patch.
apps/dav/appinfo/v1/publicwebdav.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 $linkCheckPlugin = new \OCA\DAV\Files\Sharing\PublicLinkCheckPlugin();
61 61
 $filesDropPlugin = new \OCA\DAV\Files\Sharing\FilesDropPlugin();
62 62
 
63
-$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
63
+$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function(\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
64 64
 	$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
65 65
 	$federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application();
66 66
 	$federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 	// FIXME: should not add storage wrappers outside of preSetup, need to find a better way
78 78
 	$previousLog = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false);
79
-	\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
79
+	\OC\Files\Filesystem::addStorageWrapper('sharePermissions', function($mountPoint, $storage) use ($share) {
80 80
 		return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE));
81 81
 	});
82 82
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 	OC_Util::tearDownFS();
86 86
 	OC_Util::setupFS($owner);
87
-	$ownerView = new \OC\Files\View('/'. $owner . '/files');
87
+	$ownerView = new \OC\Files\View('/'.$owner.'/files');
88 88
 	$path = $ownerView->getPath($fileId);
89 89
 	$fileInfo = $ownerView->getFileInfo($path);
90 90
 	$linkCheckPlugin->setFileInfo($fileInfo);
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/QueryBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
 			$params = [];
192 192
 			foreach ($this->getParameters() as $placeholder => $value) {
193 193
 				if (is_array($value)) {
194
-					$params[] = $placeholder . ' => (\'' . implode('\', \'', $value) . '\')';
194
+					$params[] = $placeholder.' => (\''.implode('\', \'', $value).'\')';
195 195
 				} else {
196
-					$params[] = $placeholder . ' => \'' . $value . '\'';
196
+					$params[] = $placeholder.' => \''.$value.'\'';
197 197
 				}
198 198
 			}
199 199
 			if (empty($params)) {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	public function selectAlias($select, $alias) {
411 411
 
412 412
 		$this->queryBuilder->addSelect(
413
-			$this->helper->quoteColumnName($select) . ' AS ' . $this->helper->quoteColumnName($alias)
413
+			$this->helper->quoteColumnName($select).' AS '.$this->helper->quoteColumnName($alias)
414 414
 		);
415 415
 
416 416
 		return $this;
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 	public function selectDistinct($select) {
433 433
 
434 434
 		$this->queryBuilder->addSelect(
435
-			'DISTINCT ' . $this->helper->quoteColumnName($select)
435
+			'DISTINCT '.$this->helper->quoteColumnName($select)
436 436
 		);
437 437
 
438 438
 		return $this;
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
 	 * @return IParameter
1110 1110
 	 */
1111 1111
 	public function createParameter($name) {
1112
-		return new Parameter(':' . $name);
1112
+		return new Parameter(':'.$name);
1113 1113
 	}
1114 1114
 
1115 1115
 	/**
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
 			return $table;
1177 1177
 		}
1178 1178
 
1179
-		return '*PREFIX*' . $table;
1179
+		return '*PREFIX*'.$table;
1180 1180
 	}
1181 1181
 
1182 1182
 	/**
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 			$tableAlias .= '.';
1192 1192
 		}
1193 1193
 
1194
-		return $this->helper->quoteColumnName($tableAlias . $column);
1194
+		return $this->helper->quoteColumnName($tableAlias.$column);
1195 1195
 	}
1196 1196
 
1197 1197
 	/**
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/QuoteHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,12 +70,12 @@
 block discarded – undo
70 70
 			list($alias, $columnName) = explode('.', $string, 2);
71 71
 
72 72
 			if ($columnName === '*') {
73
-				return '`' . $alias . '`.*';
73
+				return '`'.$alias.'`.*';
74 74
 			}
75 75
 
76
-			return '`' . $alias . '`.`' . $columnName . '`';
76
+			return '`'.$alias.'`.`'.$columnName.'`';
77 77
 		}
78 78
 
79
-		return '`' . $string . '`';
79
+		return '`'.$string.'`';
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
lib/private/Files/Cache/Propagator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @suppress SqlInjectionChecker
62 62
 	 */
63 63
 	public function propagateChange($internalPath, $time, $sizeDifference = 0) {
64
-		$storageId = (int)$this->storage->getStorageCache()->getNumericId();
64
+		$storageId = (int) $this->storage->getStorageCache()->getNumericId();
65 65
 
66 66
 		$parents = $this->getParents($internalPath);
67 67
 
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 		$etag = uniqid(); // since we give all folders the same etag we don't ask the storage for the etag
77 77
 
78 78
 		$builder = $this->connection->getQueryBuilder();
79
-		$hashParams = array_map(function ($hash) use ($builder) {
79
+		$hashParams = array_map(function($hash) use ($builder) {
80 80
 			return $builder->expr()->literal($hash);
81 81
 		}, $parentHashes);
82 82
 
83 83
 		$builder->update('filecache')
84
-			->set('mtime', $builder->createFunction('GREATEST(`mtime`, ' . $builder->createNamedParameter((int)$time, IQueryBuilder::PARAM_INT) . ')'))
84
+			->set('mtime', $builder->createFunction('GREATEST(`mtime`, '.$builder->createNamedParameter((int) $time, IQueryBuilder::PARAM_INT).')'))
85 85
 			->set('etag', $builder->createNamedParameter($etag, IQueryBuilder::PARAM_STR))
86 86
 			->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
87 87
 			->andWhere($builder->expr()->in('path_hash', $hashParams));
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			// we need to do size separably so we can ignore entries with uncalculated size
93 93
 			$builder = $this->connection->getQueryBuilder();
94 94
 			$builder->update('filecache')
95
-				->set('size', $builder->createFunction('`size` + ' . $builder->createNamedParameter($sizeDifference)))
95
+				->set('size', $builder->createFunction('`size` + '.$builder->createNamedParameter($sizeDifference)))
96 96
 				->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
97 97
 				->andWhere($builder->expr()->in('path_hash', $hashParams))
98 98
 				->andWhere($builder->expr()->gt('size', $builder->expr()->literal(-1, IQueryBuilder::PARAM_INT)));
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$parents = [];
108 108
 		foreach ($parts as $part) {
109 109
 			$parents[] = $parent;
110
-			$parent = trim($parent . '/' . $part, '/');
110
+			$parent = trim($parent.'/'.$part, '/');
111 111
 		}
112 112
 		return $parents;
113 113
 	}
@@ -152,17 +152,17 @@  discard block
 block discarded – undo
152 152
 		$this->connection->beginTransaction();
153 153
 
154 154
 		$query = $this->connection->getQueryBuilder();
155
-		$storageId = (int)$this->storage->getStorageCache()->getNumericId();
155
+		$storageId = (int) $this->storage->getStorageCache()->getNumericId();
156 156
 
157 157
 		$query->update('filecache')
158
-			->set('mtime', $query->createFunction('GREATEST(`mtime`, ' . $query->createParameter('time') . ')'))
158
+			->set('mtime', $query->createFunction('GREATEST(`mtime`, '.$query->createParameter('time').')'))
159 159
 			->set('etag', $query->expr()->literal(uniqid()))
160 160
 			->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT)))
161 161
 			->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash')));
162 162
 
163 163
 		$sizeQuery = $this->connection->getQueryBuilder();
164 164
 		$sizeQuery->update('filecache')
165
-			->set('size', $sizeQuery->createFunction('`size` + ' . $sizeQuery->createParameter('size')))
165
+			->set('size', $sizeQuery->createFunction('`size` + '.$sizeQuery->createParameter('size')))
166 166
 			->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT)))
167 167
 			->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash')))
168 168
 			->andWhere($sizeQuery->expr()->gt('size', $sizeQuery->expr()->literal(-1, IQueryBuilder::PARAM_INT)));
Please login to merge, or discard this patch.
lib/private/Route/Router.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	public function __construct(ILogger $logger) {
73 73
 		$this->logger = $logger;
74 74
 		$baseUrl = \OC::$WEBROOT;
75
-		if(!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
75
+		if (!(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) {
76 76
 			$baseUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
77 77
 		}
78 78
 		if (!\OC::$CLI && isset($_SERVER['REQUEST_METHOD'])) {
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 			$this->routingFiles = [];
99 99
 			foreach (\OC_APP::getEnabledApps() as $app) {
100 100
 				$appPath = \OC_App::getAppPath($app);
101
-				if($appPath !== false) {
102
-					$file = $appPath . '/appinfo/routes.php';
101
+				if ($appPath !== false) {
102
+					$file = $appPath.'/appinfo/routes.php';
103 103
 					if (file_exists($file)) {
104 104
 						$this->routingFiles[$app] = $file;
105 105
 					}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @param null|string $app
116 116
 	 */
117 117
 	public function loadRoutes($app = null) {
118
-		if(is_string($app)) {
118
+		if (is_string($app)) {
119 119
 			$app = \OC_App::cleanAppId($app);
120 120
 		}
121 121
 
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 			if (isset($this->loadedApps[$app])) {
131 131
 				return;
132 132
 			}
133
-			$file = \OC_App::getAppPath($app) . '/appinfo/routes.php';
133
+			$file = \OC_App::getAppPath($app).'/appinfo/routes.php';
134 134
 			if ($file !== false && file_exists($file)) {
135 135
 				$routingFiles = [$app => $file];
136 136
 			} else {
137 137
 				$routingFiles = [];
138 138
 			}
139 139
 		}
140
-		\OC::$server->getEventLogger()->start('loadroutes' . $requestedApp, 'Loading Routes');
140
+		\OC::$server->getEventLogger()->start('loadroutes'.$requestedApp, 'Loading Routes');
141 141
 		foreach ($routingFiles as $app => $file) {
142 142
 			if (!isset($this->loadedApps[$app])) {
143 143
 				if (!\OC_App::isAppLoaded($app)) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 				$this->useCollection($app);
151 151
 				$this->requireRouteFile($file, $app);
152 152
 				$collection = $this->getCollection($app);
153
-				$collection->addPrefix('/apps/' . $app);
153
+				$collection->addPrefix('/apps/'.$app);
154 154
 				$this->root->addCollection($collection);
155 155
 
156 156
 				// Also add the OCS collection
@@ -162,8 +162,8 @@  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__ . '/../../../settings/routes.php';
166
-			require_once __DIR__ . '/../../../core/routes.php';
165
+			require_once __DIR__.'/../../../settings/routes.php';
166
+			require_once __DIR__.'/../../../core/routes.php';
167 167
 
168 168
 			// Also add the OCS collection
169 169
 			$collection = $this->getCollection('root.ocs');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			$collection->addPrefix('/ocs');
176 176
 			$this->root->addCollection($collection);
177 177
 		}
178
-		\OC::$server->getEventLogger()->end('loadroutes' . $requestedApp);
178
+		\OC::$server->getEventLogger()->end('loadroutes'.$requestedApp);
179 179
 	}
180 180
 
181 181
 	/**
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
 	public function match($url) {
247 247
 		if (substr($url, 0, 6) === '/apps/') {
248 248
 			// empty string / 'apps' / $app / rest of the route
249
-			list(, , $app,) = explode('/', $url, 4);
249
+			list(,, $app,) = explode('/', $url, 4);
250 250
 
251 251
 			$app = \OC_App::cleanAppId($app);
252 252
 			\OC::$REQUESTEDAPP = $app;
253 253
 			$this->loadRoutes($app);
254 254
 		} else if (substr($url, 0, 13) === '/ocsapp/apps/') {
255 255
 			// empty string / 'ocsapp' / 'apps' / $app / rest of the route
256
-			list(, , , $app,) = explode('/', $url, 5);
256
+			list(,,, $app,) = explode('/', $url, 5);
257 257
 
258 258
 			$app = \OC_App::cleanAppId($app);
259 259
 			\OC::$REQUESTEDAPP = $app;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 				// However, since Symfony does not allow empty route names, the route
278 278
 				// we need to match is '/', so we need to append the '/' here.
279 279
 				try {
280
-					$parameters = $matcher->match($url . '/');
280
+					$parameters = $matcher->match($url.'/');
281 281
 				} catch (ResourceNotFoundException $newException) {
282 282
 					// If we still didn't match a route, we throw the original exception
283 283
 					throw $e;
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 		if (is_array($routes)) {
368 368
 			$appNameSpace = App::buildAppNamespace($appName);
369 369
 
370
-			$applicationClassName = $appNameSpace . '\\AppInfo\\Application';
370
+			$applicationClassName = $appNameSpace.'\\AppInfo\\Application';
371 371
 
372 372
 			if (class_exists($applicationClassName)) {
373 373
 				$application = new $applicationClassName();
Please login to merge, or discard this patch.
apps/files_sharing/lib/Controller/RemoteController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			return new DataResponse();
85 85
 		}
86 86
 
87
-		$this->logger->error('Could not accept federated share with id: ' . $id,
87
+		$this->logger->error('Could not accept federated share with id: '.$id,
88 88
 			['app' => 'files_sharing']);
89 89
 
90 90
 		throw new OCSNotFoundException('wrong share ID, share doesn\'t exist.');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @return array enriched share info with data from the filecache
116 116
 	 */
117 117
 	private static function extendShareInfo($share) {
118
-		$view = new \OC\Files\View('/' . \OC_User::getUser() . '/files/');
118
+		$view = new \OC\Files\View('/'.\OC_User::getUser().'/files/');
119 119
 		$info = $view->getFileInfo($share['mountpoint']);
120 120
 
121 121
 		$share['mimetype'] = $info->getMimetype();
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 			throw new OCSNotFoundException('Share does not exist');
179 179
 		}
180 180
 
181
-		$mountPoint = '/' . \OC_User::getUser() . '/files' . $shareInfo['mountpoint'];
181
+		$mountPoint = '/'.\OC_User::getUser().'/files'.$shareInfo['mountpoint'];
182 182
 
183 183
 		if ($this->externalManager->removeShare($mountPoint) === true) {
184 184
 			return new DataResponse();
Please login to merge, or discard this patch.