Passed
Push — master ( e7a806...6dd378 )
by Roeland
22:11 queued 10:32
created
lib/private/OCS/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 	 * @return $this
136 136
 	 */
137 137
 	public function addHeader($name, $value) {
138
-		$name = trim($name);  // always remove leading and trailing whitespace
138
+		$name = trim($name); // always remove leading and trailing whitespace
139 139
 		// to be able to reliably check for security
140 140
 		// headers
141 141
 
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/Files/Storage/Home.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	public function __construct($arguments) {
51 51
 		$this->user = $arguments['user'];
52 52
 		$datadir = $this->user->getHome();
53
-		$this->id = 'home::' . $this->user->getUID();
53
+		$this->id = 'home::'.$this->user->getUID();
54 54
 
55 55
 		parent::__construct(['datadir' => $datadir]);
56 56
 	}
Please login to merge, or discard this patch.
lib/private/Files/SimpleFS/SimpleFolder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	public function getDirectoryListing() {
50 50
 		$listing = $this->folder->getDirectoryListing();
51 51
 
52
-		$fileListing = array_map(function (Node $file) {
52
+		$fileListing = array_map(function(Node $file) {
53 53
 			if ($file instanceof File) {
54 54
 				return new SimpleFile($file);
55 55
 			}
Please login to merge, or discard this patch.
lib/private/Files/ObjectStore/HomeObjectStoreStorage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @param array $params
34 34
 	 */
35 35
 	public function __construct($params) {
36
-		if (! isset($params['user']) || ! $params['user'] instanceof User) {
36
+		if (!isset($params['user']) || !$params['user'] instanceof User) {
37 37
 			throw new \Exception('missing user object in parameters');
38 38
 		}
39 39
 		$this->user = $params['user'];
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	}
42 42
 
43 43
 	public function getId() {
44
-		return 'object::user:' . $this->user->getUID();
44
+		return 'object::user:'.$this->user->getUID();
45 45
 	}
46 46
 
47 47
 	/**
Please login to merge, or discard this patch.
lib/private/Files/Cache/HomeCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
 		}
52 52
 		if ($entry && $entry['mimetype'] === 'httpd/unix-directory') {
53 53
 			$id = $entry['fileid'];
54
-			$sql = 'SELECT SUM(`size`) AS f1 ' .
55
-			   'FROM `*PREFIX*filecache` ' .
54
+			$sql = 'SELECT SUM(`size`) AS f1 '.
55
+			   'FROM `*PREFIX*filecache` '.
56 56
 				'WHERE `parent` = ? AND `storage` = ? AND `size` >= 0';
57 57
 			$result = \OC_DB::executeAudited($sql, [$id, $this->getNumericStorageId()]);
58 58
 			if ($row = $result->fetchRow()) {
Please login to merge, or discard this patch.
lib/private/DB/PgSqlTools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	 * @return null
50 50
 	 */
51 51
 	public function resynchronizeDatabaseSequences(Connection $conn) {
52
-		$filterExpression = '/^' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/';
52
+		$filterExpression = '/^'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/';
53 53
 		$databaseName = $conn->getDatabase();
54 54
 		$conn->getConfiguration()->setFilterSchemaAssetsExpression($filterExpression);
55 55
 
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/MDB2SchemaReader.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 					$this->loadTable($schema, $child);
85 85
 					break;
86 86
 				default:
87
-					throw new \DomainException('Unknown element: ' . $child->getName());
87
+					throw new \DomainException('Unknown element: '.$child->getName());
88 88
 
89 89
 			}
90 90
 		}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			 */
105 105
 			switch ($child->getName()) {
106 106
 				case 'name':
107
-					$name = (string)$child;
107
+					$name = (string) $child;
108 108
 					$name = str_replace('*dbprefix*', $this->DBTABLEPREFIX, $name);
109 109
 					$name = $this->platform->quoteIdentifier($name);
110 110
 					$table = $schema->createTable($name);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 					$this->loadDeclaration($table, $child);
121 121
 					break;
122 122
 				default:
123
-					throw new \DomainException('Unknown element: ' . $child->getName());
123
+					throw new \DomainException('Unknown element: '.$child->getName());
124 124
 
125 125
 			}
126 126
 		}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 					$this->loadIndex($table, $child);
145 145
 					break;
146 146
 				default:
147
-					throw new \DomainException('Unknown element: ' . $child->getName());
147
+					throw new \DomainException('Unknown element: '.$child->getName());
148 148
 
149 149
 			}
150 150
 		}
@@ -156,18 +156,18 @@  discard block
 block discarded – undo
156 156
 	 * @throws \DomainException
157 157
 	 */
158 158
 	private function loadField($table, $xml) {
159
-		$options = [ 'notnull' => false ];
159
+		$options = ['notnull' => false];
160 160
 		foreach ($xml->children() as $child) {
161 161
 			/**
162 162
 			 * @var \SimpleXMLElement $child
163 163
 			 */
164 164
 			switch ($child->getName()) {
165 165
 				case 'name':
166
-					$name = (string)$child;
166
+					$name = (string) $child;
167 167
 					$name = $this->platform->quoteIdentifier($name);
168 168
 					break;
169 169
 				case 'type':
170
-					$type = (string)$child;
170
+					$type = (string) $child;
171 171
 					switch ($type) {
172 172
 						case 'text':
173 173
 							$type = 'string';
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 					}
185 185
 					break;
186 186
 				case 'length':
187
-					$length = (string)$child;
187
+					$length = (string) $child;
188 188
 					$options['length'] = $length;
189 189
 					break;
190 190
 				case 'unsigned':
@@ -200,11 +200,11 @@  discard block
 block discarded – undo
200 200
 					$options['autoincrement'] = $autoincrement;
201 201
 					break;
202 202
 				case 'default':
203
-					$default = (string)$child;
203
+					$default = (string) $child;
204 204
 					$options['default'] = $default;
205 205
 					break;
206 206
 				case 'comments':
207
-					$comment = (string)$child;
207
+					$comment = (string) $child;
208 208
 					$options['comment'] = $comment;
209 209
 					break;
210 210
 				case 'primary':
@@ -212,15 +212,15 @@  discard block
 block discarded – undo
212 212
 					$options['primary'] = $primary;
213 213
 					break;
214 214
 				case 'precision':
215
-					$precision = (string)$child;
215
+					$precision = (string) $child;
216 216
 					$options['precision'] = $precision;
217 217
 					break;
218 218
 				case 'scale':
219
-					$scale = (string)$child;
219
+					$scale = (string) $child;
220 220
 					$options['scale'] = $scale;
221 221
 					break;
222 222
 				default:
223
-					throw new \DomainException('Unknown element: ' . $child->getName());
223
+					throw new \DomainException('Unknown element: '.$child->getName());
224 224
 
225 225
 			}
226 226
 		}
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 				}
243 243
 			}
244 244
 			if ($type === 'integer' && isset($options['default'])) {
245
-				$options['default'] = (int)$options['default'];
245
+				$options['default'] = (int) $options['default'];
246 246
 			}
247 247
 			if ($type === 'integer' && isset($options['length'])) {
248 248
 				$length = $options['length'];
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 			 */
283 283
 			switch ($child->getName()) {
284 284
 				case 'name':
285
-					$name = (string)$child;
285
+					$name = (string) $child;
286 286
 					break;
287 287
 				case 'primary':
288 288
 					$primary = $this->asBool($child);
@@ -297,20 +297,20 @@  discard block
 block discarded – undo
297 297
 						 */
298 298
 						switch ($field->getName()) {
299 299
 							case 'name':
300
-								$field_name = (string)$field;
300
+								$field_name = (string) $field;
301 301
 								$field_name = $this->platform->quoteIdentifier($field_name);
302 302
 								$fields[] = $field_name;
303 303
 								break;
304 304
 							case 'sorting':
305 305
 								break;
306 306
 							default:
307
-								throw new \DomainException('Unknown element: ' . $field->getName());
307
+								throw new \DomainException('Unknown element: '.$field->getName());
308 308
 
309 309
 						}
310 310
 					}
311 311
 					break;
312 312
 				default:
313
-					throw new \DomainException('Unknown element: ' . $child->getName());
313
+					throw new \DomainException('Unknown element: '.$child->getName());
314 314
 
315 315
 			}
316 316
 		}
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 				}
329 329
 			}
330 330
 		} else {
331
-			throw new \DomainException('Empty index definition: ' . $name . ' options:' . print_r($fields, true));
331
+			throw new \DomainException('Empty index definition: '.$name.' options:'.print_r($fields, true));
332 332
 		}
333 333
 	}
334 334
 
@@ -337,12 +337,12 @@  discard block
 block discarded – undo
337 337
 	 * @return bool
338 338
 	 */
339 339
 	private function asBool($xml) {
340
-		$result = (string)$xml;
340
+		$result = (string) $xml;
341 341
 		if ($result == 'true') {
342 342
 			$result = true;
343 343
 		} elseif ($result == 'false') {
344 344
 			$result = false;
345 345
 		}
346
-		return (bool)$result;
346
+		return (bool) $result;
347 347
 	}
348 348
 }
Please login to merge, or discard this patch.