Completed
Push — master ( ca0f2f...6aa6d2 )
by Björn
33:52 queued 15:38
created
lib/private/Files/Node/Root.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -372,12 +372,12 @@
 block discarded – undo
372 372
 			\OC\Files\Filesystem::initMountPoints($userId);
373 373
 
374 374
 			try {
375
-				$folder = $this->get('/' . $userId . '/files');
375
+				$folder = $this->get('/'.$userId.'/files');
376 376
 			} catch (NotFoundException $e) {
377
-				if (!$this->nodeExists('/' . $userId)) {
378
-					$this->newFolder('/' . $userId);
377
+				if (!$this->nodeExists('/'.$userId)) {
378
+					$this->newFolder('/'.$userId);
379 379
 				}
380
-				$folder = $this->newFolder('/' . $userId . '/files');
380
+				$folder = $this->newFolder('/'.$userId.'/files');
381 381
 			}
382 382
 
383 383
 			$this->userFolderCache->set($userId, $folder);
Please login to merge, or discard this patch.
lib/private/Files/Node/Node.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 		$path = str_replace('\\', '/', $path);
289 289
 		//add leading slash
290 290
 		if ($path[0] !== '/') {
291
-			$path = '/' . $path;
291
+			$path = '/'.$path;
292 292
 		}
293 293
 		//remove duplicate slashes
294 294
 		while (strpos($path, '//') !== false) {
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 	 */
309 309
 	public function isValidPath($path) {
310 310
 		if (!$path || $path[0] !== '/') {
311
-			$path = '/' . $path;
311
+			$path = '/'.$path;
312 312
 		}
313 313
 		if (strstr($path, '/../') || strrchr($path, '/') === '/..') {
314 314
 			return false;
@@ -389,14 +389,14 @@  discard block
 block discarded – undo
389 389
 			$this->root->emit('\OC\Files', 'preCopy', [$this, $nonExisting]);
390 390
 			$this->root->emit('\OC\Files', 'preWrite', [$nonExisting]);
391 391
 			if (!$this->view->copy($this->path, $targetPath)) {
392
-				throw new NotPermittedException('Could not copy ' . $this->path . ' to ' . $targetPath);
392
+				throw new NotPermittedException('Could not copy '.$this->path.' to '.$targetPath);
393 393
 			}
394 394
 			$targetNode = $this->root->get($targetPath);
395 395
 			$this->root->emit('\OC\Files', 'postCopy', [$this, $targetNode]);
396 396
 			$this->root->emit('\OC\Files', 'postWrite', [$targetNode]);
397 397
 			return $targetNode;
398 398
 		} else {
399
-			throw new NotPermittedException('No permission to copy to path ' . $targetPath);
399
+			throw new NotPermittedException('No permission to copy to path '.$targetPath);
400 400
 		}
401 401
 	}
402 402
 
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 			$this->root->emit('\OC\Files', 'preRename', [$this, $nonExisting]);
414 414
 			$this->root->emit('\OC\Files', 'preWrite', [$nonExisting]);
415 415
 			if (!$this->view->rename($this->path, $targetPath)) {
416
-				throw new NotPermittedException('Could not move ' . $this->path . ' to ' . $targetPath);
416
+				throw new NotPermittedException('Could not move '.$this->path.' to '.$targetPath);
417 417
 			}
418 418
 			$targetNode = $this->root->get($targetPath);
419 419
 			$this->root->emit('\OC\Files', 'postRename', [$this, $targetNode]);
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			$this->path = $targetPath;
422 422
 			return $targetNode;
423 423
 		} else {
424
-			throw new NotPermittedException('No permission to move to path ' . $targetPath);
424
+			throw new NotPermittedException('No permission to move to path '.$targetPath);
425 425
 		}
426 426
 	}
427 427
 
Please login to merge, or discard this patch.
lib/private/Files/Mount/ObjectHomeMountProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 			return null;
65 65
 		}
66 66
 
67
-		return new MountPoint('\OC\Files\ObjectStore\HomeObjectStoreStorage', '/' . $user->getUID(), $config['arguments'], $loader);
67
+		return new MountPoint('\OC\Files\ObjectStore\HomeObjectStoreStorage', '/'.$user->getUID(), $config['arguments'], $loader);
68 68
 	}
69 69
 
70 70
 	/**
Please login to merge, or discard this patch.
lib/private/Files/Mount/LocalHomeMountProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,6 +39,6 @@
 block discarded – undo
39 39
 	 */
40 40
 	public function getHomeMountForUser(IUser $user, IStorageFactory $loader) {
41 41
 		$arguments = ['user' => $user];
42
-		return new MountPoint('\OC\Files\Storage\Home', '/' . $user->getUID(), $arguments, $loader);
42
+		return new MountPoint('\OC\Files\Storage\Home', '/'.$user->getUID(), $arguments, $loader);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
lib/private/Files/AppData/AppData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 				throw new \RuntimeException('no instance id!');
74 74
 			}
75 75
 
76
-			$name = 'appdata_' . $instanceId;
76
+			$name = 'appdata_'.$instanceId;
77 77
 
78 78
 			try {
79 79
 				$appDataFolder = $this->rootFolder->get($name);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				try {
92 92
 					$appDataFolder = $appDataFolder->newFolder($this->appId);
93 93
 				} catch (NotPermittedException $e) {
94
-					throw new \RuntimeException('Could not get appdata folder for ' . $this->appId);
94
+					throw new \RuntimeException('Could not get appdata folder for '.$this->appId);
95 95
 				}
96 96
 			}
97 97
 
Please login to merge, or discard this patch.
lib/private/Files/Stream/Quota.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,10 +66,10 @@
 block discarded – undo
66 66
 	}
67 67
 
68 68
 	public function stream_seek($offset, $whence = SEEK_SET) {
69
-		if ($whence === SEEK_END){
69
+		if ($whence === SEEK_END) {
70 70
 			// go to the end to find out last position's offset
71 71
 			$oldOffset = $this->stream_tell();
72
-			if (fseek($this->source, 0, $whence) !== 0){
72
+			if (fseek($this->source, 0, $whence) !== 0) {
73 73
 				return false;
74 74
 			}
75 75
 			$whence = SEEK_SET;
Please login to merge, or discard this patch.
lib/private/Files/ObjectStore/HomeObjectStoreStorage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@
 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'];
40 40
 		parent::__construct($params);
41 41
 	}
42 42
 
43
-	public function getId () {
44
-		return 'object::user:' . $this->user->getUID();
43
+	public function getId() {
44
+		return 'object::user:'.$this->user->getUID();
45 45
 	}
46 46
 
47 47
 	/**
Please login to merge, or discard this patch.
lib/private/Files/ObjectStore/Mapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
 	public function getBucket($numBuckets = 64) {
51 51
 		$hash = md5($this->user->getUID());
52 52
 		$num = hexdec(substr($hash, 0, 4));
53
-		return (string)($num % $numBuckets);
53
+		return (string) ($num % $numBuckets);
54 54
 	}
55 55
 }
Please login to merge, or discard this patch.
lib/private/Files/Type/Detection.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 		// Update the alternative mimetypes to avoid having to look them up each time.
104 104
 		foreach ($this->mimetypes as $mimeType) {
105
-			$this->secureMimeTypes[$mimeType[0]] = isset($mimeType[1]) ? $mimeType[1]: $mimeType[0];
105
+			$this->secureMimeTypes[$mimeType[0]] = isset($mimeType[1]) ? $mimeType[1] : $mimeType[0];
106 106
 		}
107 107
 	}
108 108
 
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 			return;
115 115
 		}
116 116
 
117
-		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true);
117
+		$this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true);
118 118
 
119
-		if (file_exists($this->customConfigDir . '/mimetypealiases.json')) {
120
-			$custom = json_decode(file_get_contents($this->customConfigDir . '/mimetypealiases.json'), true);
119
+		if (file_exists($this->customConfigDir.'/mimetypealiases.json')) {
120
+			$custom = json_decode(file_get_contents($this->customConfigDir.'/mimetypealiases.json'), true);
121 121
 			$this->mimeTypeAlias = array_merge($this->mimeTypeAlias, $custom);
122 122
 		}
123 123
 	}
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
 			return;
139 139
 		}
140 140
 
141
-		$mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypemapping.dist.json'), true);
141
+		$mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypemapping.dist.json'), true);
142 142
 
143 143
 		//Check if need to load custom mappings
144
-		if (file_exists($this->customConfigDir . '/mimetypemapping.json')) {
145
-			$custom = json_decode(file_get_contents($this->customConfigDir . '/mimetypemapping.json'), true);
144
+		if (file_exists($this->customConfigDir.'/mimetypemapping.json')) {
145
+			$custom = json_decode(file_get_contents($this->customConfigDir.'/mimetypemapping.json'), true);
146 146
 			$mimetypeMapping = array_merge($mimetypeMapping, $custom);
147 147
 		}
148 148
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
 		// Icon exists?
308 308
 		try {
309
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.svg');
309
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$icon.'.svg');
310 310
 			return $this->mimetypeIcons[$mimetype];
311 311
 		} catch (\RuntimeException $e) {
312 312
 			// Specified image not found
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 		// Try only the first part of the filetype
316 316
 		$mimePart = substr($icon, 0, strpos($icon, '-'));
317 317
 		try {
318
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.svg');
318
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$mimePart.'.svg');
319 319
 			return $this->mimetypeIcons[$mimetype];
320 320
 		} catch (\RuntimeException $e) {
321 321
 			// Image for the first part of the mimetype not found
Please login to merge, or discard this patch.