Passed
Push — master ( 1ad063...0f7fb7 )
by Morris
22:31 queued 11:17
created
lib/public/Util.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -304,9 +304,9 @@
 block discarded – undo
304 304
 	 */
305 305
 	public static function linkToRemote($service) {
306 306
 		$urlGenerator = \OC::$server->getURLGenerator();
307
-		$remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service;
307
+		$remoteBase = $urlGenerator->linkTo('', 'remote.php').'/'.$service;
308 308
 		return $urlGenerator->getAbsoluteURL(
309
-			$remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '')
309
+			$remoteBase.(($service[strlen($service) - 1] != '/') ? '/' : '')
310 310
 		);
311 311
 	}
312 312
 
Please login to merge, or discard this patch.
lib/public/AppFramework/Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 		// default responders
80 80
 		$this->responders = [
81
-			'json' => function ($data) {
81
+			'json' => function($data) {
82 82
 				if ($data instanceof DataResponse) {
83 83
 					$response = new JSONResponse(
84 84
 						$data->getData(),
@@ -153,6 +153,6 @@  discard block
 block discarded – undo
153 153
 			return $responder($response);
154 154
 		}
155 155
 		throw new \DomainException('No responder registered for format '.
156
-			$format . '!');
156
+			$format.'!');
157 157
 	}
158 158
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/FileDisplayResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$this->file = $file;
52 52
 		$this->setStatus($statusCode);
53 53
 		$this->setHeaders(array_merge($this->getHeaders(), $headers));
54
-		$this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
54
+		$this->addHeader('Content-Disposition', 'inline; filename="'.rawurldecode($file->getName()).'"');
55 55
 
56 56
 		$this->setETag($file->getEtag());
57 57
 		$lastModified = new \DateTime();
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function callback(IOutput $output) {
67 67
 		if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
68
-			$output->setHeader('Content-Length: ' . $this->file->getSize());
68
+			$output->setHeader('Content-Length: '.$this->file->getSize());
69 69
 			$output->setOutput($this->file->getContent());
70 70
 		}
71 71
 	}
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/JSONResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 	public function render() {
69 69
 		$response = json_encode($this->data, JSON_HEX_TAG);
70 70
 		if ($response === false) {
71
-			throw new \Exception(sprintf('Could not json_encode due to invalid ' .
71
+			throw new \Exception(sprintf('Could not json_encode due to invalid '.
72 72
 				'non UTF-8 characters in the array: %s', var_export($this->data, true)));
73 73
 		}
74 74
 
Please login to merge, or discard this patch.
lib/private/Archive/ZIP.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			$result = $this->zip->addFromString($path, $source);
73 73
 		}
74 74
 		if ($result) {
75
-			$this->zip->close();//close and reopen to save the zip
75
+			$this->zip->close(); //close and reopen to save the zip
76 76
 			$this->zip->open($this->path);
77 77
 		}
78 78
 		return $result;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	public function getFiles() {
131 131
 		$fileCount = $this->zip->numFiles;
132 132
 		$files = [];
133
-		for ($i = 0;$i < $fileCount;$i++) {
133
+		for ($i = 0; $i < $fileCount; $i++) {
134 134
 			$files[] = $this->zip->getNameIndex($i);
135 135
 		}
136 136
 		return $files;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 				$this->extractFile($path, $tmpFile);
205 205
 			}
206 206
 			$handle = fopen($tmpFile, $mode);
207
-			return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
207
+			return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) {
208 208
 				$this->writeBack($tmpFile, $path);
209 209
 			});
210 210
 		}
Please login to merge, or discard this patch.
lib/private/App/CodeChecker/NodeVisitor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -214,28 +214,28 @@  discard block
 block discarded – undo
214 214
 		$alias = strtolower($alias);
215 215
 
216 216
 		foreach ($this->blackListedClassNames as $blackListedAlias => $blackListedClassName) {
217
-			if (strpos($blackListedClassName, $name . '\\') === 0) {
217
+			if (strpos($blackListedClassName, $name.'\\') === 0) {
218 218
 				$aliasedClassName = str_replace($name, $alias, $blackListedClassName);
219 219
 				$this->blackListedClassNames[$aliasedClassName] = $blackListedClassName;
220 220
 			}
221 221
 		}
222 222
 
223 223
 		foreach ($this->blackListedConstants as $blackListedAlias => $blackListedConstant) {
224
-			if (strpos($blackListedConstant, $name . '\\') === 0 || strpos($blackListedConstant, $name . '::') === 0) {
224
+			if (strpos($blackListedConstant, $name.'\\') === 0 || strpos($blackListedConstant, $name.'::') === 0) {
225 225
 				$aliasedConstantName = str_replace($name, $alias, $blackListedConstant);
226 226
 				$this->blackListedConstants[$aliasedConstantName] = $blackListedConstant;
227 227
 			}
228 228
 		}
229 229
 
230 230
 		foreach ($this->blackListedFunctions as $blackListedAlias => $blackListedFunction) {
231
-			if (strpos($blackListedFunction, $name . '\\') === 0 || strpos($blackListedFunction, $name . '::') === 0) {
231
+			if (strpos($blackListedFunction, $name.'\\') === 0 || strpos($blackListedFunction, $name.'::') === 0) {
232 232
 				$aliasedFunctionName = str_replace($name, $alias, $blackListedFunction);
233 233
 				$this->blackListedFunctions[$aliasedFunctionName] = $blackListedFunction;
234 234
 			}
235 235
 		}
236 236
 
237 237
 		foreach ($this->blackListedMethods as $blackListedAlias => $blackListedMethod) {
238
-			if (strpos($blackListedMethod, $name . '\\') === 0 || strpos($blackListedMethod, $name . '::') === 0) {
238
+			if (strpos($blackListedMethod, $name.'\\') === 0 || strpos($blackListedMethod, $name.'::') === 0) {
239 239
 				$aliasedMethodName = str_replace($name, $alias, $blackListedMethod);
240 240
 				$this->blackListedMethods[$aliasedMethodName] = $blackListedMethod;
241 241
 			}
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 	}
257 257
 
258 258
 	private function checkBlackListConstant($class, $constantName, Node $node) {
259
-		$name = $class . '::' . $constantName;
259
+		$name = $class.'::'.$constantName;
260 260
 		$lowerName = strtolower($name);
261 261
 
262 262
 		if (isset($this->blackListedConstants[$lowerName])) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	}
271 271
 
272 272
 	private function checkBlackListFunction($class, $functionName, Node $node) {
273
-		$name = $class . '::' . $functionName;
273
+		$name = $class.'::'.$functionName;
274 274
 		$lowerName = strtolower($name);
275 275
 
276 276
 		if (isset($this->blackListedFunctions[$lowerName])) {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 	}
285 285
 
286 286
 	private function checkBlackListMethod($class, $functionName, Node $node) {
287
-		$name = $class . '::' . $functionName;
287
+		$name = $class.'::'.$functionName;
288 288
 		$lowerName = strtolower($name);
289 289
 
290 290
 		if (isset($this->blackListedMethods[$lowerName])) {
Please login to merge, or discard this patch.
lib/private/Files/FileInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @return int|null
152 152
 	 */
153 153
 	public function getId() {
154
-		return isset($this->data['fileid']) ? (int)  $this->data['fileid'] : null;
154
+		return isset($this->data['fileid']) ? (int) $this->data['fileid'] : null;
155 155
 	}
156 156
 
157 157
 	/**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	public function getEtag() {
182 182
 		$this->updateEntryfromSubMounts();
183 183
 		if (count($this->childEtags) > 0) {
184
-			$combinedEtag = $this->data['etag'] . '::' . implode('::', $this->childEtags);
184
+			$combinedEtag = $this->data['etag'].'::'.implode('::', $this->childEtags);
185 185
 			return md5($combinedEtag);
186 186
 		} else {
187 187
 			return $this->data['etag'];
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 			$relativeEntryPath = substr($entryPath, strlen($this->getPath()));
378 378
 			// attach the permissions to propagate etag on permision changes of submounts
379 379
 			$permissions = isset($data['permissions']) ? $data['permissions'] : 0;
380
-			$this->childEtags[] = $relativeEntryPath . '/' . $data['etag'] . $permissions;
380
+			$this->childEtags[] = $relativeEntryPath.'/'.$data['etag'].$permissions;
381 381
 		}
382 382
 	}
383 383
 
Please login to merge, or discard this patch.
lib/private/DB/AdapterSqlite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,14 +64,14 @@
 block discarded – undo
64 64
 		if (empty($compare)) {
65 65
 			$compare = array_keys($input);
66 66
 		}
67
-		$fieldList = '`' . implode('`,`', array_keys($input)) . '`';
67
+		$fieldList = '`'.implode('`,`', array_keys($input)).'`';
68 68
 		$query = "INSERT INTO `$table` ($fieldList) SELECT "
69 69
 			. str_repeat('?,', count($input) - 1).'? '
70 70
 			. " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE ";
71 71
 
72 72
 		$inserts = array_values($input);
73 73
 		foreach ($compare as $key) {
74
-			$query .= '`' . $key . '`';
74
+			$query .= '`'.$key.'`';
75 75
 			if (is_null($input[$key])) {
76 76
 				$query .= ' IS NULL AND ';
77 77
 			} else {
Please login to merge, or discard this patch.
lib/private/DB/Connection.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			return parent::connect();
60 60
 		} catch (DBALException $e) {
61 61
 			// throw a new exception to prevent leaking info from the stacktrace
62
-			throw new DBALException('Failed to connect to the database: ' . $e->getMessage(), $e->getCode());
62
+			throw new DBALException('Failed to connect to the database: '.$e->getMessage(), $e->getCode());
63 63
 		}
64 64
 	}
65 65
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		// 0 is the method where we use `getCallerBacktrace`
112 112
 		// 1 is the target method which uses the method we want to log
113 113
 		if (isset($traces[1])) {
114
-			return $traces[1]['file'] . ':' . $traces[1]['line'];
114
+			return $traces[1]['file'].':'.$traces[1]['line'];
115 115
 		}
116 116
 
117 117
 		return '';
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 			$insertQb = $this->getQueryBuilder();
281 281
 			$insertQb->insert($table)
282 282
 				->values(
283
-					array_map(function ($value) use ($insertQb) {
283
+					array_map(function($value) use ($insertQb) {
284 284
 						return $insertQb->createNamedParameter($value, $this->getType($value));
285 285
 					}, array_merge($keys, $values))
286 286
 				);
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 			throw new \BadMethodCallException('Can not lock a new table until the previous lock is released.');
325 325
 		}
326 326
 
327
-		$tableName = $this->tablePrefix . $tableName;
327
+		$tableName = $this->tablePrefix.$tableName;
328 328
 		$this->lockedTable = $tableName;
329 329
 		$this->adapter->lockTable($tableName);
330 330
 	}
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
 	 * @return string
346 346
 	 */
347 347
 	public function getError() {
348
-		$msg = $this->errorCode() . ': ';
348
+		$msg = $this->errorCode().': ';
349 349
 		$errorInfo = $this->errorInfo();
350 350
 		if (is_array($errorInfo)) {
351
-			$msg .= 'SQLSTATE = '.$errorInfo[0] . ', ';
352
-			$msg .= 'Driver Code = '.$errorInfo[1] . ', ';
351
+			$msg .= 'SQLSTATE = '.$errorInfo[0].', ';
352
+			$msg .= 'Driver Code = '.$errorInfo[1].', ';
353 353
 			$msg .= 'Driver Message = '.$errorInfo[2];
354 354
 		}
355 355
 		return $msg;
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 	 * @param string $table table name without the prefix
362 362
 	 */
363 363
 	public function dropTable($table) {
364
-		$table = $this->tablePrefix . trim($table);
364
+		$table = $this->tablePrefix.trim($table);
365 365
 		$schema = $this->getSchemaManager();
366 366
 		if ($schema->tablesExist([$table])) {
367 367
 			$schema->dropTable($table);
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 	 * @return bool
376 376
 	 */
377 377
 	public function tableExists($table) {
378
-		$table = $this->tablePrefix . trim($table);
378
+		$table = $this->tablePrefix.trim($table);
379 379
 		$schema = $this->getSchemaManager();
380 380
 		return $schema->tablesExist([$table]);
381 381
 	}
Please login to merge, or discard this patch.