Passed
Push — master ( 62403d...0c3e2f )
by Joas
14:50 queued 14s
created
lib/private/Template/CSSResourceLocator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 		) {
66 66
 			return;
67 67
 		}
68
-		$style = substr($style, strpos($style, '/')+1);
68
+		$style = substr($style, strpos($style, '/') + 1);
69 69
 		$app_path = \OC_App::getAppPath($app);
70 70
 		$app_url = \OC_App::getAppWebPath($app);
71 71
 
72 72
 		if ($app_path === false && $app_url === false) {
73 73
 			$this->logger->error('Could not find resource {resource} to load', [
74
-				'resource' => $app . '/' . $style . '.css',
74
+				'resource' => $app.'/'.$style.'.css',
75 75
 				'app' => 'cssresourceloader',
76 76
 			]);
77 77
 			return;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		// turned into cwd.
83 83
 		$app_path = realpath($app_path);
84 84
 
85
-		if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) {
85
+		if (!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) {
86 86
 			$this->append($app_path, $style.'.css', $app_url);
87 87
 		}
88 88
 	}
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	protected function cacheAndAppendScssIfExist($root, $file, $app = 'core') {
108 108
 		if (is_file($root.'/'.$file)) {
109
-			if($this->scssCacher !== null) {
110
-				if($this->scssCacher->process($root, $file, $app)) {
109
+			if ($this->scssCacher !== null) {
110
+				if ($this->scssCacher->process($root, $file, $app)) {
111 111
 
112 112
 					$this->append($root, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true);
113 113
 					return true;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 				}
146 146
 			}
147 147
 
148
-			$this->resources[] = [$webRoot? : \OC::$WEBROOT, $webRoot, $file];
148
+			$this->resources[] = [$webRoot ?: \OC::$WEBROOT, $webRoot, $file];
149 149
 		}
150 150
 	}
151 151
 }
Please login to merge, or discard this patch.
lib/private/Cache/File.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 			$rootView = new View();
56 56
 			$user = \OC::$server->getUserSession()->getUser();
57 57
 			Filesystem::initMountPoints($user->getUID());
58
-			if (!$rootView->file_exists('/' . $user->getUID() . '/cache')) {
59
-				$rootView->mkdir('/' . $user->getUID() . '/cache');
58
+			if (!$rootView->file_exists('/'.$user->getUID().'/cache')) {
59
+				$rootView->mkdir('/'.$user->getUID().'/cache');
60 60
 			}
61
-			$this->storage = new View('/' . $user->getUID() . '/cache');
61
+			$this->storage = new View('/'.$user->getUID().'/cache');
62 62
 			return $this->storage;
63 63
 		} else {
64 64
 			\OCP\Util::writeLog('core', 'Can\'t get cache storage, user not logged in', ILogger::ERROR);
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
 		// unique id to avoid chunk collision, just in case
109 109
 		$uniqueId = \OC::$server->getSecureRandom()->generate(
110 110
 			16,
111
-			ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER
111
+			ISecureRandom::CHAR_DIGITS.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER
112 112
 		);
113 113
 
114 114
 		// use part file to prevent hasKey() to find the key
115 115
 		// while it is being written
116
-		$keyPart = $key . '.' . $uniqueId . '.part';
116
+		$keyPart = $key.'.'.$uniqueId.'.part';
117 117
 		if ($storage and $storage->file_put_contents($keyPart, $value)) {
118 118
 			if ($ttl === 0) {
119 119
 				$ttl = 86400; // 60*60*24
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			if (is_resource($dh)) {
163 163
 				while (($file = readdir($dh)) !== false) {
164 164
 					if ($file != '.' and $file != '..' and ($prefix === '' || strpos($file, $prefix) === 0)) {
165
-						$storage->unlink('/' . $file);
165
+						$storage->unlink('/'.$file);
166 166
 					}
167 167
 				}
168 168
 			}
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
 			while (($file = readdir($dh)) !== false) {
188 188
 				if ($file != '.' and $file != '..') {
189 189
 					try {
190
-						$mtime = $storage->filemtime('/' . $file);
190
+						$mtime = $storage->filemtime('/'.$file);
191 191
 						if ($mtime < $now) {
192
-							$storage->unlink('/' . $file);
192
+							$storage->unlink('/'.$file);
193 193
 						}
194 194
 					} catch (\OCP\Lock\LockedException $e) {
195 195
 						// ignore locked chunks
196
-						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']);
196
+						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']);
197 197
 					} catch (\OCP\Files\ForbiddenException $e) {
198
-						\OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "' . $file . '"', ['app' => 'core']);
198
+						\OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "'.$file.'"', ['app' => 'core']);
199 199
 					} catch (\OCP\Files\LockNotAcquiredException $e) {
200
-						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']);
200
+						\OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']);
201 201
 					}
202 202
 				}
203 203
 			}
Please login to merge, or discard this patch.
lib/private/User/Backend.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 	/**
39 39
 	 * actions that user backends can define
40 40
 	 */
41
-	const CREATE_USER		= 1;			// 1 << 0
42
-	const SET_PASSWORD		= 16;			// 1 << 4
43
-	const CHECK_PASSWORD	= 256;			// 1 << 8
44
-	const GET_HOME			= 4096;			// 1 << 12
45
-	const GET_DISPLAYNAME	= 65536;		// 1 << 16
46
-	const SET_DISPLAYNAME	= 1048576;		// 1 << 20
47
-	const PROVIDE_AVATAR	= 16777216;		// 1 << 24
48
-	const COUNT_USERS		= 268435456;	// 1 << 28
41
+	const CREATE_USER = 1; // 1 << 0
42
+	const SET_PASSWORD = 16; // 1 << 4
43
+	const CHECK_PASSWORD = 256; // 1 << 8
44
+	const GET_HOME = 4096; // 1 << 12
45
+	const GET_DISPLAYNAME	= 65536; // 1 << 16
46
+	const SET_DISPLAYNAME	= 1048576; // 1 << 20
47
+	const PROVIDE_AVATAR = 16777216; // 1 << 24
48
+	const COUNT_USERS = 268435456; // 1 << 28
49 49
 
50 50
 	protected $possibleActions = [
51 51
 		self::CREATE_USER => 'createUser',
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 	*/
68 68
 	public function getSupportedActions() {
69 69
 		$actions = 0;
70
-		foreach($this->possibleActions AS $action => $methodName) {
71
-			if(method_exists($this, $methodName)) {
70
+		foreach ($this->possibleActions AS $action => $methodName) {
71
+			if (method_exists($this, $methodName)) {
72 72
 				$actions |= $action;
73 73
 			}
74 74
 		}
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	* compared with self::CREATE_USER etc.
86 86
 	*/
87 87
 	public function implementsActions($actions) {
88
-		return (bool)($this->getSupportedActions() & $actions);
88
+		return (bool) ($this->getSupportedActions() & $actions);
89 89
 	}
90 90
 
91 91
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 *
96 96
 	 * Deletes a user
97 97
 	 */
98
-	public function deleteUser( $uid ) {
98
+	public function deleteUser($uid) {
99 99
 		return false;
100 100
 	}
101 101
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	public function getDisplayNames($search = '', $limit = null, $offset = null) {
150 150
 		$displayNames = [];
151 151
 		$users = $this->getUsers($search, $limit, $offset);
152
-		foreach ( $users as $user) {
152
+		foreach ($users as $user) {
153 153
 			$displayNames[$user] = $user;
154 154
 		}
155 155
 		return $displayNames;
Please login to merge, or discard this patch.
lib/private/User/User.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		$this->backend = $backend;
87 87
 		$this->dispatcher = $dispatcher;
88 88
 		$this->emitter = $emitter;
89
-		if(is_null($config)) {
89
+		if (is_null($config)) {
90 90
 			$config = \OC::$server->getConfig();
91 91
 		}
92 92
 		$this->config = $config;
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	public function setEMailAddress($mailAddress) {
164 164
 		$oldMailAddress = $this->getEMailAddress();
165
-		if($oldMailAddress !== $mailAddress) {
166
-			if($mailAddress === '') {
165
+		if ($oldMailAddress !== $mailAddress) {
166
+			if ($mailAddress === '') {
167 167
 				$this->config->deleteUserValue($this->uid, 'settings', 'email');
168 168
 			} else {
169 169
 				$this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 * @return bool
201 201
 	 */
202 202
 	public function delete() {
203
-		$this->dispatcher->dispatch(IUser::class . '::preDelete', new GenericEvent($this));
203
+		$this->dispatcher->dispatch(IUser::class.'::preDelete', new GenericEvent($this));
204 204
 		if ($this->emitter) {
205 205
 			$this->emitter->emit('\OC\User', 'preDelete', [$this]);
206 206
 		}
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 			}
233 233
 
234 234
 			// Delete the users entry in the storage table
235
-			Storage::remove('home::' . $this->uid);
235
+			Storage::remove('home::'.$this->uid);
236 236
 
237 237
 			\OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid);
238 238
 			\OC::$server->getCommentsManager()->deleteReadMarksFromUser($this);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 			$accountManager = \OC::$server->query(AccountManager::class);
246 246
 			$accountManager->deleteUser($this);
247 247
 
248
-			$this->dispatcher->dispatch(IUser::class . '::postDelete', new GenericEvent($this));
248
+			$this->dispatcher->dispatch(IUser::class.'::postDelete', new GenericEvent($this));
249 249
 			if ($this->emitter) {
250 250
 				$this->emitter->emit('\OC\User', 'postDelete', [$this]);
251 251
 			}
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	 * @return bool
262 262
 	 */
263 263
 	public function setPassword($password, $recoveryPassword = null) {
264
-		$this->dispatcher->dispatch(IUser::class . '::preSetPassword', new GenericEvent($this, [
264
+		$this->dispatcher->dispatch(IUser::class.'::preSetPassword', new GenericEvent($this, [
265 265
 			'password' => $password,
266 266
 			'recoveryPassword' => $recoveryPassword,
267 267
 		]));
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 		}
271 271
 		if ($this->backend->implementsActions(Backend::SET_PASSWORD)) {
272 272
 			$result = $this->backend->setPassword($this->uid, $password);
273
-			$this->dispatcher->dispatch(IUser::class . '::postSetPassword', new GenericEvent($this, [
273
+			$this->dispatcher->dispatch(IUser::class.'::postSetPassword', new GenericEvent($this, [
274 274
 				'password' => $password,
275 275
 				'recoveryPassword' => $recoveryPassword,
276 276
 			]));
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
 			if ($this->backend->implementsActions(Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) {
294 294
 				$this->home = $home;
295 295
 			} elseif ($this->config) {
296
-				$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $this->uid;
296
+				$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$this->uid;
297 297
 			} else {
298
-				$this->home = \OC::$SERVERROOT . '/data/' . $this->uid;
298
+				$this->home = \OC::$SERVERROOT.'/data/'.$this->uid;
299 299
 			}
300 300
 		}
301 301
 		return $this->home;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * @return string
308 308
 	 */
309 309
 	public function getBackendClassName() {
310
-		if($this->backend instanceof IUserBackend) {
310
+		if ($this->backend instanceof IUserBackend) {
311 311
 			return $this->backend->getBackendName();
312 312
 		}
313 313
 		return get_class($this->backend);
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 	 */
393 393
 	public function getQuota() {
394 394
 		$quota = $this->config->getUserValue($this->uid, 'files', 'quota', 'default');
395
-		if($quota === 'default') {
395
+		if ($quota === 'default') {
396 396
 			$quota = $this->config->getAppValue('files', 'default_quota', 'none');
397 397
 		}
398 398
 		return $quota;
@@ -407,11 +407,11 @@  discard block
 block discarded – undo
407 407
 	 */
408 408
 	public function setQuota($quota) {
409 409
 		$oldQuota = $this->config->getUserValue($this->uid, 'files', 'quota', '');
410
-		if($quota !== 'none' and $quota !== 'default') {
410
+		if ($quota !== 'none' and $quota !== 'default') {
411 411
 			$quota = OC_Helper::computerFileSize($quota);
412 412
 			$quota = OC_Helper::humanFileSize($quota);
413 413
 		}
414
-		if($quota !== $oldQuota) {
414
+		if ($quota !== $oldQuota) {
415 415
 			$this->config->setUserValue($this->uid, 'files', 'quota', $quota);
416 416
 			$this->triggerChange('quota', $quota, $oldQuota);
417 417
 		}
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 	public function getCloudId() {
449 449
 		$uid = $this->getUID();
450 450
 		$server = $this->urlGenerator->getAbsoluteURL('/');
451
-		$server =  rtrim( $this->removeProtocolFromUrl($server), '/');
451
+		$server = rtrim($this->removeProtocolFromUrl($server), '/');
452 452
 		return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId();
453 453
 	}
454 454
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 	}
468 468
 
469 469
 	public function triggerChange($feature, $value = null, $oldValue = null) {
470
-		$this->dispatcher->dispatch(IUser::class . '::changeUser', new GenericEvent($this, [
470
+		$this->dispatcher->dispatch(IUser::class.'::changeUser', new GenericEvent($this, [
471 471
 			'feature' => $feature,
472 472
 			'value' => $value,
473 473
 			'oldValue' => $oldValue,
Please login to merge, or discard this patch.
lib/private/Log/ErrorHandler.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		return preg_replace('/\/\/(.*):(.*)@/', '//xxx:xxx@', $msg);
41 41
 	}
42 42
 
43
-	public static function register($debug=false) {
43
+	public static function register($debug = false) {
44 44
 		$handler = new ErrorHandler();
45 45
 
46 46
 		if ($debug) {
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 	//Fatal errors handler
63 63
 	public static function onShutdown() {
64 64
 		$error = error_get_last();
65
-		if($error && self::$logger) {
65
+		if ($error && self::$logger) {
66 66
 			//ob_end_clean();
67
-			$msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line'];
67
+			$msg = $error['message'].' at '.$error['file'].'#'.$error['line'];
68 68
 			self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
69 69
 		}
70 70
 	}
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	public static function onException($exception) {
78 78
 		$class = get_class($exception);
79 79
 		$msg = $exception->getMessage();
80
-		$msg = "$class: $msg at " . $exception->getFile() . '#' . $exception->getLine();
80
+		$msg = "$class: $msg at ".$exception->getFile().'#'.$exception->getLine();
81 81
 		self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
82 82
 	}
83 83
 
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
 		if (error_reporting() === 0) {
87 87
 			return;
88 88
 		}
89
-		$msg = $message . ' at ' . $file . '#' . $line;
89
+		$msg = $message.' at '.$file.'#'.$line;
90 90
 		self::$logger->error(self::removePassword($msg), ['app' => 'PHP']);
91 91
 
92 92
 	}
93 93
 
94 94
 	//Recoverable handler which catch all errors, warnings and notices
95 95
 	public static function onAll($number, $message, $file, $line) {
96
-		$msg = $message . ' at ' . $file . '#' . $line;
96
+		$msg = $message.' at '.$file.'#'.$line;
97 97
 		self::$logger->debug(self::removePassword($msg), ['app' => 'PHP']);
98 98
 
99 99
 	}
Please login to merge, or discard this patch.
lib/private/Log/File.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		parent::__construct($config);
58 58
 		$this->logFile = $path;
59 59
 		if (!file_exists($this->logFile)) {
60
-			if(
60
+			if (
61 61
 				(
62 62
 					!is_writable(dirname($this->logFile))
63 63
 					|| !touch($this->logFile)
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 * @param int $offset
105 105
 	 * @return array
106 106
 	 */
107
-	public function getEntries(int $limit=50, int $offset=0):array {
107
+	public function getEntries(int $limit = 50, int $offset = 0):array {
108 108
 		$minLevel = $this->config->getValue("loglevel", ILogger::WARN);
109 109
 		$entries = [];
110 110
 		$handle = @fopen($this->logFile, 'rb');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			$entriesCount = 0;
116 116
 			$lines = 0;
117 117
 			// Loop through each character of the file looking for new lines
118
-			while ($pos >= 0 && ($limit === null ||$entriesCount < $limit)) {
118
+			while ($pos >= 0 && ($limit === null || $entriesCount < $limit)) {
119 119
 				fseek($handle, $pos);
120 120
 				$ch = fgetc($handle);
121 121
 				if ($ch == "\n" || $pos == 0) {
Please login to merge, or discard this patch.
lib/private/Route/CachingRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 	 */
52 52
 	public function generate($name, $parameters = [], $absolute = false) {
53 53
 		asort($parameters);
54
-		$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . (int)$absolute;
54
+		$key = $this->context->getHost().'#'.$this->context->getBaseUrl().$name.sha1(json_encode($parameters)).(int) $absolute;
55 55
 		$cachedKey = $this->cache->get($key);
56 56
 		if ($cachedKey) {
57 57
 			return $cachedKey;
Please login to merge, or discard this patch.
lib/private/AllConfig.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 * because the database connection was created with an uninitialized config
89 89
 	 */
90 90
 	private function fixDIInit() {
91
-		if($this->connection === null) {
91
+		if ($this->connection === null) {
92 92
 			$this->connection = \OC::$server->getDatabaseConnection();
93 93
 		}
94 94
 	}
@@ -261,9 +261,9 @@  discard block
 block discarded – undo
261 261
 		$prevValue = $this->getUserValue($userId, $appName, $key, null);
262 262
 
263 263
 		if ($prevValue !== null) {
264
-			if ($prevValue === (string)$value) {
264
+			if ($prevValue === (string) $value) {
265 265
 				return;
266
-			} else if ($preCondition !== null && $prevValue !== (string)$preCondition) {
266
+			} else if ($preCondition !== null && $prevValue !== (string) $preCondition) {
267 267
 				throw new PreConditionNotMetException();
268 268
 			} else {
269 269
 				$qb = $this->connection->getQueryBuilder();
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 					->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter($key)));
275 275
 				$qb->execute();
276 276
 
277
-				$this->userCache[$userId][$appName][$key] = (string)$value;
277
+				$this->userCache[$userId][$appName][$key] = (string) $value;
278 278
 				return;
279 279
 			}
280 280
 		}
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 			if (!isset($this->userCache[$userId][$appName])) {
300 300
 				$this->userCache[$userId][$appName] = [];
301 301
 			}
302
-			$this->userCache[$userId][$appName][$key] = (string)$value;
302
+			$this->userCache[$userId][$appName][$key] = (string) $value;
303 303
 		}
304 304
 	}
305 305
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 		// TODO - FIXME
349 349
 		$this->fixDIInit();
350 350
 
351
-		$sql  = 'DELETE FROM `*PREFIX*preferences` '.
351
+		$sql = 'DELETE FROM `*PREFIX*preferences` '.
352 352
 				'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?';
353 353
 		$this->connection->executeUpdate($sql, [$userId, $appName, $key]);
354 354
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 		// TODO - FIXME
367 367
 		$this->fixDIInit();
368 368
 
369
-		$sql  = 'DELETE FROM `*PREFIX*preferences` '.
369
+		$sql = 'DELETE FROM `*PREFIX*preferences` '.
370 370
 			'WHERE `userid` = ?';
371 371
 		$this->connection->executeUpdate($sql, [$userId]);
372 372
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 		// TODO - FIXME
383 383
 		$this->fixDIInit();
384 384
 
385
-		$sql  = 'DELETE FROM `*PREFIX*preferences` '.
385
+		$sql = 'DELETE FROM `*PREFIX*preferences` '.
386 386
 				'WHERE `appid` = ?';
387 387
 		$this->connection->executeUpdate($sql, [$appName]);
388 388
 
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			return $this->userCache[$userId];
406 406
 		}
407 407
 		if ($userId === null || $userId === '') {
408
-			$this->userCache[$userId]=[];
408
+			$this->userCache[$userId] = [];
409 409
 			return $this->userCache[$userId];
410 410
 		}
411 411
 
@@ -452,12 +452,12 @@  discard block
 block discarded – undo
452 452
 			array_unshift($queryParams, $key);
453 453
 			array_unshift($queryParams, $appName);
454 454
 
455
-			$placeholders = (count($chunk) === 50) ? $placeholders50 :  implode(',', array_fill(0, count($chunk), '?'));
455
+			$placeholders = (count($chunk) === 50) ? $placeholders50 : implode(',', array_fill(0, count($chunk), '?'));
456 456
 
457
-			$query    = 'SELECT `userid`, `configvalue` ' .
458
-						'FROM `*PREFIX*preferences` ' .
459
-						'WHERE `appid` = ? AND `configkey` = ? ' .
460
-						'AND `userid` IN (' . $placeholders . ')';
457
+			$query = 'SELECT `userid`, `configvalue` '.
458
+						'FROM `*PREFIX*preferences` '.
459
+						'WHERE `appid` = ? AND `configkey` = ? '.
460
+						'AND `userid` IN ('.$placeholders.')';
461 461
 			$result = $this->connection->executeQuery($query, $queryParams);
462 462
 
463 463
 			while ($row = $result->fetch()) {
@@ -480,10 +480,10 @@  discard block
 block discarded – undo
480 480
 		// TODO - FIXME
481 481
 		$this->fixDIInit();
482 482
 
483
-		$sql  = 'SELECT `userid` FROM `*PREFIX*preferences` ' .
483
+		$sql = 'SELECT `userid` FROM `*PREFIX*preferences` '.
484 484
 				'WHERE `appid` = ? AND `configkey` = ? ';
485 485
 
486
-		if($this->getSystemValue('dbtype', 'sqlite') === 'oci') {
486
+		if ($this->getSystemValue('dbtype', 'sqlite') === 'oci') {
487 487
 			//oracle hack: need to explicitly cast CLOB to CHAR for comparison
488 488
 			$sql .= 'AND to_char(`configvalue`) = ?';
489 489
 		} else {
@@ -512,10 +512,10 @@  discard block
 block discarded – undo
512 512
 		// TODO - FIXME
513 513
 		$this->fixDIInit();
514 514
 
515
-		$sql  = 'SELECT `userid` FROM `*PREFIX*preferences` ' .
515
+		$sql = 'SELECT `userid` FROM `*PREFIX*preferences` '.
516 516
 			'WHERE `appid` = ? AND `configkey` = ? ';
517 517
 
518
-		if($this->getSystemValue('dbtype', 'sqlite') === 'oci') {
518
+		if ($this->getSystemValue('dbtype', 'sqlite') === 'oci') {
519 519
 			//oracle hack: need to explicitly cast CLOB to CHAR for comparison
520 520
 			$sql .= 'AND LOWER(to_char(`configvalue`)) = LOWER(?)';
521 521
 		} else {
Please login to merge, or discard this patch.
lib/private/Repair/RepairMimeTypes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	private function updateMimetypes($updatedMimetypes) {
92 92
 		if (empty($this->folderMimeTypeId)) {
93 93
 			$result = \OC_DB::executeAudited(self::getIdStmt(), ['httpd/unix-directory']);
94
-			$this->folderMimeTypeId = (int)$result->fetchOne();
94
+			$this->folderMimeTypeId = (int) $result->fetchOne();
95 95
 		}
96 96
 
97 97
 		$count = 0;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			$mimetypeId = $result->fetchOne();
110 110
 
111 111
 			// change mimetype for files with x extension
112
-			$count += \OC_DB::executeAudited(self::updateByNameStmt(), [$mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension]);
112
+			$count += \OC_DB::executeAudited(self::updateByNameStmt(), [$mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.'.$extension]);
113 113
 		}
114 114
 
115 115
 		return $count;
Please login to merge, or discard this patch.