Passed
Push — master ( ef06c3...757a84 )
by Morris
12:02 queued 16s
created
lib/private/User/User.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$this->backend = $backend;
84 84
 		$this->dispatcher = $dispatcher;
85 85
 		$this->emitter = $emitter;
86
-		if(is_null($config)) {
86
+		if (is_null($config)) {
87 87
 			$config = \OC::$server->getConfig();
88 88
 		}
89 89
 		$this->config = $config;
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function setEMailAddress($mailAddress) {
160 160
 		$oldMailAddress = $this->getEMailAddress();
161
-		if($oldMailAddress !== $mailAddress) {
162
-			if($mailAddress === '') {
161
+		if ($oldMailAddress !== $mailAddress) {
162
+			if ($mailAddress === '') {
163 163
 				$this->config->deleteUserValue($this->uid, 'settings', 'email');
164 164
 			} else {
165 165
 				$this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	 * @return bool
197 197
 	 */
198 198
 	public function delete() {
199
-		$this->dispatcher->dispatch(IUser::class . '::preDelete', new GenericEvent($this));
199
+		$this->dispatcher->dispatch(IUser::class.'::preDelete', new GenericEvent($this));
200 200
 		if ($this->emitter) {
201 201
 			$this->emitter->emit('\OC\User', 'preDelete', array($this));
202 202
 		}
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 			}
229 229
 
230 230
 			// Delete the users entry in the storage table
231
-			Storage::remove('home::' . $this->uid);
231
+			Storage::remove('home::'.$this->uid);
232 232
 
233 233
 			\OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid);
234 234
 			\OC::$server->getCommentsManager()->deleteReadMarksFromUser($this);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 			$accountManager = \OC::$server->query(AccountManager::class);
242 242
 			$accountManager->deleteUser($this);
243 243
 
244
-			$this->dispatcher->dispatch(IUser::class . '::postDelete', new GenericEvent($this));
244
+			$this->dispatcher->dispatch(IUser::class.'::postDelete', new GenericEvent($this));
245 245
 			if ($this->emitter) {
246 246
 				$this->emitter->emit('\OC\User', 'postDelete', array($this));
247 247
 			}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * @return bool
258 258
 	 */
259 259
 	public function setPassword($password, $recoveryPassword = null) {
260
-		$this->dispatcher->dispatch(IUser::class . '::preSetPassword', new GenericEvent($this, [
260
+		$this->dispatcher->dispatch(IUser::class.'::preSetPassword', new GenericEvent($this, [
261 261
 			'password' => $password,
262 262
 			'recoveryPassword' => $recoveryPassword,
263 263
 		]));
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		}
267 267
 		if ($this->backend->implementsActions(Backend::SET_PASSWORD)) {
268 268
 			$result = $this->backend->setPassword($this->uid, $password);
269
-			$this->dispatcher->dispatch(IUser::class . '::postSetPassword', new GenericEvent($this, [
269
+			$this->dispatcher->dispatch(IUser::class.'::postSetPassword', new GenericEvent($this, [
270 270
 				'password' => $password,
271 271
 				'recoveryPassword' => $recoveryPassword,
272 272
 			]));
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
 			if ($this->backend->implementsActions(Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) {
290 290
 				$this->home = $home;
291 291
 			} elseif ($this->config) {
292
-				$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $this->uid;
292
+				$this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$this->uid;
293 293
 			} else {
294
-				$this->home = \OC::$SERVERROOT . '/data/' . $this->uid;
294
+				$this->home = \OC::$SERVERROOT.'/data/'.$this->uid;
295 295
 			}
296 296
 		}
297 297
 		return $this->home;
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	 * @return string
304 304
 	 */
305 305
 	public function getBackendClassName() {
306
-		if($this->backend instanceof IUserBackend) {
306
+		if ($this->backend instanceof IUserBackend) {
307 307
 			return $this->backend->getBackendName();
308 308
 		}
309 309
 		return get_class($this->backend);
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 	 */
389 389
 	public function getQuota() {
390 390
 		$quota = $this->config->getUserValue($this->uid, 'files', 'quota', 'default');
391
-		if($quota === 'default') {
391
+		if ($quota === 'default') {
392 392
 			$quota = $this->config->getAppValue('files', 'default_quota', 'none');
393 393
 		}
394 394
 		return $quota;
@@ -403,11 +403,11 @@  discard block
 block discarded – undo
403 403
 	 */
404 404
 	public function setQuota($quota) {
405 405
 		$oldQuota = $this->config->getUserValue($this->uid, 'files', 'quota', '');
406
-		if($quota !== 'none' and $quota !== 'default') {
406
+		if ($quota !== 'none' and $quota !== 'default') {
407 407
 			$quota = OC_Helper::computerFileSize($quota);
408 408
 			$quota = OC_Helper::humanFileSize($quota);
409 409
 		}
410
-		if($quota !== $oldQuota) {
410
+		if ($quota !== $oldQuota) {
411 411
 			$this->config->setUserValue($this->uid, 'files', 'quota', $quota);
412 412
 			$this->triggerChange('quota', $quota, $oldQuota);
413 413
 		}
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 	public function getCloudId() {
445 445
 		$uid = $this->getUID();
446 446
 		$server = $this->urlGenerator->getAbsoluteURL('/');
447
-		$server =  rtrim( $this->removeProtocolFromUrl($server), '/');
447
+		$server = rtrim($this->removeProtocolFromUrl($server), '/');
448 448
 		return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId();
449 449
 	}
450 450
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 	}
464 464
 
465 465
 	public function triggerChange($feature, $value = null, $oldValue = null) {
466
-		$this->dispatcher->dispatch(IUser::class . '::changeUser', new GenericEvent($this, [
466
+		$this->dispatcher->dispatch(IUser::class.'::changeUser', new GenericEvent($this, [
467 467
 			'feature' => $feature,
468 468
 			'value' => $value,
469 469
 			'oldValue' => $oldValue,
Please login to merge, or discard this patch.