Passed
Push — master ( e7a806...6dd378 )
by Roeland
22:11 queued 10:32
created
lib/private/DB/OracleConnection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @param string $table table name without the prefix
83 83
 	 */
84 84
 	public function dropTable($table) {
85
-		$table = $this->tablePrefix . trim($table);
85
+		$table = $this->tablePrefix.trim($table);
86 86
 		$table = $this->quoteIdentifier($table);
87 87
 		$schema = $this->getSchemaManager();
88 88
 		if ($schema->tablesExist([$table])) {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 * @return bool
98 98
 	 */
99 99
 	public function tableExists($table) {
100
-		$table = $this->tablePrefix . trim($table);
100
+		$table = $this->tablePrefix.trim($table);
101 101
 		$table = $this->quoteIdentifier($table);
102 102
 		$schema = $this->getSchemaManager();
103 103
 		return $schema->tablesExist([$table]);
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.
lib/private/DB/Migrator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 * @return string
136 136
 	 */
137 137
 	protected function generateTemporaryTableName($name) {
138
-		return $this->config->getSystemValue('dbtableprefix', 'oc_') . $name . '_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
138
+		return $this->config->getSystemValue('dbtableprefix', 'oc_').$name.'_'.$this->random->generate(13, ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS);
139 139
 	}
140 140
 
141 141
 	/**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 				$indexName = $index->getName();
187 187
 			} else {
188 188
 				// avoid conflicts in index names
189
-				$indexName = $this->config->getSystemValue('dbtableprefix', 'oc_') . $this->random->generate(13, ISecureRandom::CHAR_LOWER);
189
+				$indexName = $this->config->getSystemValue('dbtableprefix', 'oc_').$this->random->generate(13, ISecureRandom::CHAR_LOWER);
190 190
 			}
191 191
 			$newIndexes[] = new Index($indexName, $index->getColumns(), $index->isUnique(), $index->isPrimary());
192 192
 		}
@@ -271,15 +271,15 @@  discard block
 block discarded – undo
271 271
 		$quotedSource = $this->connection->quoteIdentifier($sourceName);
272 272
 		$quotedTarget = $this->connection->quoteIdentifier($targetName);
273 273
 
274
-		$this->connection->exec('CREATE TABLE ' . $quotedTarget . ' (LIKE ' . $quotedSource . ')');
275
-		$this->connection->exec('INSERT INTO ' . $quotedTarget . ' SELECT * FROM ' . $quotedSource);
274
+		$this->connection->exec('CREATE TABLE '.$quotedTarget.' (LIKE '.$quotedSource.')');
275
+		$this->connection->exec('INSERT INTO '.$quotedTarget.' SELECT * FROM '.$quotedSource);
276 276
 	}
277 277
 
278 278
 	/**
279 279
 	 * @param string $name
280 280
 	 */
281 281
 	protected function dropTable($name) {
282
-		$this->connection->exec('DROP TABLE ' . $this->connection->quoteIdentifier($name));
282
+		$this->connection->exec('DROP TABLE '.$this->connection->quoteIdentifier($name));
283 283
 	}
284 284
 
285 285
 	/**
@@ -287,14 +287,14 @@  discard block
 block discarded – undo
287 287
 	 * @return string
288 288
 	 */
289 289
 	protected function convertStatementToScript($statement) {
290
-		$script = $statement . ';';
290
+		$script = $statement.';';
291 291
 		$script .= PHP_EOL;
292 292
 		$script .= PHP_EOL;
293 293
 		return $script;
294 294
 	}
295 295
 
296 296
 	protected function getFilterExpression() {
297
-		return '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/';
297
+		return '/^'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/';
298 298
 	}
299 299
 
300 300
 	protected function emit($sql, $step, $max) {
Please login to merge, or discard this patch.
lib/private/DB/MDB2SchemaWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
 
52 52
 		// FIX ME: bloody work around
53 53
 		if ($config->getSystemValue('dbtype', 'sqlite') === 'oci') {
54
-			$filterExpression = '/^"' . preg_quote($conn->getPrefix()) . '/';
54
+			$filterExpression = '/^"'.preg_quote($conn->getPrefix()).'/';
55 55
 		} else {
56
-			$filterExpression = '/^' . preg_quote($conn->getPrefix()) . '/';
56
+			$filterExpression = '/^'.preg_quote($conn->getPrefix()).'/';
57 57
 		}
58 58
 		$conn->getConfiguration()->setFilterSchemaAssetsExpression($filterExpression);
59 59
 
Please login to merge, or discard this patch.
lib/private/PreviewManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -333,7 +333,7 @@
 block discarded – undo
333 333
 	 */
334 334
 	protected function registerCoreProvider($class, $mimeType, $options = []) {
335 335
 		if (in_array(trim($class, '\\'), $this->getEnabledDefaultProvider())) {
336
-			$this->registerProvider($mimeType, function () use ($class, $options) {
336
+			$this->registerProvider($mimeType, function() use ($class, $options) {
337 337
 				return new $class($options);
338 338
 			});
339 339
 		}
Please login to merge, or discard this patch.
lib/private/Memcache/Memcached.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function get($key) {
100
-		$result = self::$cache->get($this->getNameSpace() . $key);
100
+		$result = self::$cache->get($this->getNameSpace().$key);
101 101
 		if ($result === false and self::$cache->getResultCode() == \Memcached::RES_NOTFOUND) {
102 102
 			return null;
103 103
 		} else {
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
 
108 108
 	public function set($key, $value, $ttl = 0) {
109 109
 		if ($ttl > 0) {
110
-			$result = self::$cache->set($this->getNameSpace() . $key, $value, $ttl);
110
+			$result = self::$cache->set($this->getNameSpace().$key, $value, $ttl);
111 111
 		} else {
112
-			$result = self::$cache->set($this->getNameSpace() . $key, $value);
112
+			$result = self::$cache->set($this->getNameSpace().$key, $value);
113 113
 		}
114 114
 		if ($result !== true) {
115 115
 			$this->verifyReturnCode();
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	public function hasKey($key) {
121
-		self::$cache->get($this->getNameSpace() . $key);
121
+		self::$cache->get($this->getNameSpace().$key);
122 122
 		return self::$cache->getResultCode() === \Memcached::RES_SUCCESS;
123 123
 	}
124 124
 
125 125
 	public function remove($key) {
126
-		$result = self::$cache->delete($this->getNameSpace() . $key);
126
+		$result = self::$cache->delete($this->getNameSpace().$key);
127 127
 		if (self::$cache->getResultCode() !== \Memcached::RES_NOTFOUND) {
128 128
 			$this->verifyReturnCode();
129 129
 		}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 
133 133
 	public function clear($prefix = '') {
134
-		$prefix = $this->getNameSpace() . $prefix;
134
+		$prefix = $this->getNameSpace().$prefix;
135 135
 		$allKeys = self::$cache->getAllKeys();
136 136
 		if ($allKeys === false) {
137 137
 			// newer Memcached doesn't like getAllKeys(), flush everything
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @throws \Exception
166 166
 	 */
167 167
 	public function add($key, $value, $ttl = 0) {
168
-		$result = self::$cache->add($this->getPrefix() . $key, $value, $ttl);
168
+		$result = self::$cache->add($this->getPrefix().$key, $value, $ttl);
169 169
 		if (self::$cache->getResultCode() !== \Memcached::RES_NOTSTORED) {
170 170
 			$this->verifyReturnCode();
171 171
 		}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function inc($key, $step = 1) {
183 183
 		$this->add($key, 0);
184
-		$result = self::$cache->increment($this->getPrefix() . $key, $step);
184
+		$result = self::$cache->increment($this->getPrefix().$key, $step);
185 185
 
186 186
 		if (self::$cache->getResultCode() !== \Memcached::RES_SUCCESS) {
187 187
 			return false;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 * @return int | bool
199 199
 	 */
200 200
 	public function dec($key, $step = 1) {
201
-		$result = self::$cache->decrement($this->getPrefix() . $key, $step);
201
+		$result = self::$cache->decrement($this->getPrefix().$key, $step);
202 202
 
203 203
 		if (self::$cache->getResultCode() !== \Memcached::RES_SUCCESS) {
204 204
 			return false;
Please login to merge, or discard this patch.
lib/private/Memcache/APCu.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	use CADTrait;
38 38
 
39 39
 	public function get($key) {
40
-		$result = apcu_fetch($this->getPrefix() . $key, $success);
40
+		$result = apcu_fetch($this->getPrefix().$key, $success);
41 41
 		if (!$success) {
42 42
 			return null;
43 43
 		}
@@ -45,24 +45,24 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	public function set($key, $value, $ttl = 0) {
48
-		return apcu_store($this->getPrefix() . $key, $value, $ttl);
48
+		return apcu_store($this->getPrefix().$key, $value, $ttl);
49 49
 	}
50 50
 
51 51
 	public function hasKey($key) {
52
-		return apcu_exists($this->getPrefix() . $key);
52
+		return apcu_exists($this->getPrefix().$key);
53 53
 	}
54 54
 
55 55
 	public function remove($key) {
56
-		return apcu_delete($this->getPrefix() . $key);
56
+		return apcu_delete($this->getPrefix().$key);
57 57
 	}
58 58
 
59 59
 	public function clear($prefix = '') {
60
-		$ns = $this->getPrefix() . $prefix;
60
+		$ns = $this->getPrefix().$prefix;
61 61
 		$ns = preg_quote($ns, '/');
62 62
 		if (class_exists('\APCIterator')) {
63
-			$iter = new \APCIterator('user', '/^' . $ns . '/', APC_ITER_KEY);
63
+			$iter = new \APCIterator('user', '/^'.$ns.'/', APC_ITER_KEY);
64 64
 		} else {
65
-			$iter = new \APCUIterator('/^' . $ns . '/', APC_ITER_KEY);
65
+			$iter = new \APCUIterator('/^'.$ns.'/', APC_ITER_KEY);
66 66
 		}
67 67
 		return apcu_delete($iter);
68 68
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @return bool
77 77
 	 */
78 78
 	public function add($key, $value, $ttl = 0) {
79
-		return apcu_add($this->getPrefix() . $key, $value, $ttl);
79
+		return apcu_add($this->getPrefix().$key, $value, $ttl);
80 80
 	}
81 81
 
82 82
 	/**
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
 		 * see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221
101 101
 		 * for details
102 102
 		 */
103
-		return apcu_exists($this->getPrefix() . $key)
104
-			? apcu_inc($this->getPrefix() . $key, $step)
103
+		return apcu_exists($this->getPrefix().$key)
104
+			? apcu_inc($this->getPrefix().$key, $step)
105 105
 			: false;
106 106
 	}
107 107
 
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 		 * see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221
126 126
 		 * for details
127 127
 		 */
128
-		return apcu_exists($this->getPrefix() . $key)
129
-			? apcu_dec($this->getPrefix() . $key, $step)
128
+		return apcu_exists($this->getPrefix().$key)
129
+			? apcu_dec($this->getPrefix().$key, $step)
130 130
 			: false;
131 131
 	}
132 132
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	public function cas($key, $old, $new) {
142 142
 		// apc only does cas for ints
143 143
 		if (is_int($old) and is_int($new)) {
144
-			return apcu_cas($this->getPrefix() . $key, $old, $new);
144
+			return apcu_cas($this->getPrefix().$key, $old, $new);
145 145
 		} else {
146 146
 			return $this->casEmulated($key, $old, $new);
147 147
 		}
Please login to merge, or discard this patch.
lib/private/Group/MetaData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 			IUserSession $userSession
61 61
 			) {
62 62
 		$this->user = $user;
63
-		$this->isAdmin = (bool)$isAdmin;
63
+		$this->isAdmin = (bool) $isAdmin;
64 64
 		$this->groupManager = $groupManager;
65 65
 		$this->userSession = $userSession;
66 66
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @return array
77 77
 	 */
78 78
 	public function get($groupSearch = '', $userSearch = '') {
79
-		$key = $groupSearch . '::' . $userSearch;
79
+		$key = $groupSearch.'::'.$userSearch;
80 80
 		if (isset($this->metaData[$key])) {
81 81
 			return $this->metaData[$key];
82 82
 		}
Please login to merge, or discard this patch.
lib/private/Group/Backend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	 * compared with \OC\Group\Backend::CREATE_GROUP etc.
68 68
 	 */
69 69
 	public function implementsActions($actions) {
70
-		return (bool)($this->getSupportedActions() & $actions);
70
+		return (bool) ($this->getSupportedActions() & $actions);
71 71
 	}
72 72
 
73 73
 	/**
Please login to merge, or discard this patch.