Passed
Push — master ( 1cfb85...57437e )
by Roeland
20:48 queued 10:26
created
apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@
 block discarded – undo
57 57
 	 * @return false
58 58
 	 */
59 59
 	function httpGet(RequestInterface $request, ResponseInterface $response) {
60
-		$string = 'This is the WebDAV interface. It can only be accessed by ' .
60
+		$string = 'This is the WebDAV interface. It can only be accessed by '.
61 61
 			'WebDAV clients such as the Nextcloud desktop sync client.';
62
-		$stream = fopen('php://memory','r+');
62
+		$stream = fopen('php://memory', 'r+');
63 63
 		fwrite($stream, $string);
64 64
 		rewind($stream);
65 65
 
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Helper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		$result = array();
45 45
 		$timestamp = null;
46 46
 
47
-		$view = new \OC\Files\View('/' . $user . '/files_trashbin/files');
47
+		$view = new \OC\Files\View('/'.$user.'/files_trashbin/files');
48 48
 
49 49
 		if (ltrim($dir, '/') !== '' && !$view->is_dir($dir)) {
50 50
 			throw new \Exception('Directory does not exists');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 				$timestamp = substr(pathinfo($parts[0], PATHINFO_EXTENSION), 1);
73 73
 			}
74 74
 			$originalPath = '';
75
-			$originalName = substr($entryName, 0, -strlen($timestamp)-2);
75
+			$originalName = substr($entryName, 0, -strlen($timestamp) - 2);
76 76
 			if (isset($originalLocations[$originalName][$timestamp])) {
77 77
 				$originalPath = $originalLocations[$originalName][$timestamp];
78 78
 				if (substr($originalPath, -1) === '/') {
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 			);
93 93
 			if ($originalPath) {
94 94
 				if ($originalPath !== '.') {
95
-					$i['extraData'] = $originalPath . '/' . $originalName;
95
+					$i['extraData'] = $originalPath.'/'.$originalName;
96 96
 				} else {
97 97
 					$i['extraData'] = $originalName;
98 98
 				}
99 99
 			}
100
-			$result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i, $mount);
100
+			$result[] = new FileInfo($absoluteDir.'/'.$i['name'], $storage, $internalPath.'/'.$i['name'], $i, $mount);
101 101
 		}
102 102
 
103 103
 		if ($sortAttribute !== '') {
Please login to merge, or discard this patch.
settings/Controller/ChangePasswordController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 				]);
111 111
 			}
112 112
 		// password policy app throws exception
113
-		} catch(HintException $e) {
113
+		} catch (HintException $e) {
114 114
 			return new JSONResponse([
115 115
 				'status' => 'error',
116 116
 				'data' => [
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 						'message' => $this->l->t('Please provide an admin recovery password; otherwise, all user data will be lost.'),
221 221
 					]
222 222
 				]);
223
-			} elseif ($recoveryEnabledForUser && ! $validRecoveryPassword) {
223
+			} elseif ($recoveryEnabledForUser && !$validRecoveryPassword) {
224 224
 				return new JSONResponse([
225 225
 					'status' => 'error',
226 226
 					'data' => [
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 				try {
232 232
 					$result = $targetUser->setPassword($password, $recoveryPassword);
233 233
 				// password policy app throws exception
234
-				} catch(HintException $e) {
234
+				} catch (HintException $e) {
235 235
 					return new JSONResponse([
236 236
 						'status' => 'error',
237 237
 						'data' => [
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 					]);
267 267
 				}
268 268
 			// password policy app throws exception
269
-			} catch(HintException $e) {
269
+			} catch (HintException $e) {
270 270
 				return new JSONResponse([
271 271
 					'status' => 'error',
272 272
 					'data' => [
Please login to merge, or discard this patch.
apps/dav/lib/CardDAV/SyncService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 			if ($ex->getCode() === Http::STATUS_UNAUTHORIZED) {
100 100
 				// remote server revoked access to the address book, remove it
101 101
 				$this->backend->deleteAddressBook($addressBookId);
102
-				$this->logger->info('Authorization failed, remove address book: ' . $url, ['app' => 'dav']);
102
+				$this->logger->info('Authorization failed, remove address book: '.$url, ['app' => 'dav']);
103 103
 				throw $ex;
104 104
 			}
105 105
 		}
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	protected function getClient($url, $userName, $sharedSecret) {
151 151
 		$settings = [
152
-			'baseUri' => $url . '/',
152
+			'baseUri' => $url.'/',
153 153
 			'userName' => $userName,
154 154
 			'password' => $sharedSecret,
155 155
 		];
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 	 */
270 270
 	public function deleteUser($userOrCardId) {
271 271
 		$systemAddressBook = $this->getLocalSystemAddressBook();
272
-		if ($userOrCardId instanceof IUser){
272
+		if ($userOrCardId instanceof IUser) {
273 273
 			$name = $userOrCardId->getBackendClassName();
274 274
 			$userId = $userOrCardId->getUID();
275 275
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		if (is_null($this->localSystemAddressBook)) {
286 286
 			$systemPrincipal = "principals/system/system";
287 287
 			$this->localSystemAddressBook = $this->ensureSystemAddressBookExists($systemPrincipal, 'system', [
288
-				'{' . Plugin::NS_CARDDAV . '}addressbook-description' => 'System addressbook which holds all users of this instance'
288
+				'{'.Plugin::NS_CARDDAV.'}addressbook-description' => 'System addressbook which holds all users of this instance'
289 289
 			]);
290 290
 		}
291 291
 
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 
304 304
 		// remove no longer existing
305 305
 		$allCards = $this->backend->getCards($systemAddressBook['id']);
306
-		foreach($allCards as $card) {
306
+		foreach ($allCards as $card) {
307 307
 			$vCard = Reader::read($card['carddata']);
308 308
 			$uid = $vCard->UID->getValue();
309 309
 			// load backend and see if user exists
Please login to merge, or discard this patch.
lib/private/Files/FileInfo.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @param \OCP\Files\Mount\IMountPoint $mount
88 88
 	 * @param \OCP\IUser|null $owner
89 89
 	 */
90
-	public function __construct($path, $storage, $internalPath, $data, $mount, $owner= null) {
90
+	public function __construct($path, $storage, $internalPath, $data, $mount, $owner = null) {
91 91
 		$this->path = $path;
92 92
 		$this->storage = $storage;
93 93
 		$this->internalPath = $internalPath;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @return int|null
154 154
 	 */
155 155
 	public function getId() {
156
-		return isset($this->data['fileid']) ? (int)  $this->data['fileid'] : null;
156
+		return isset($this->data['fileid']) ? (int) $this->data['fileid'] : null;
157 157
 	}
158 158
 
159 159
 	/**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	public function getEtag() {
184 184
 		$this->updateEntryfromSubMounts();
185 185
 		if (count($this->childEtags) > 0) {
186
-			$combinedEtag = $this->data['etag'] . '::' . implode('::', $this->childEtags);
186
+			$combinedEtag = $this->data['etag'].'::'.implode('::', $this->childEtags);
187 187
 			return md5($combinedEtag);
188 188
 		} else {
189 189
 			return $this->data['etag'];
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 			$relativeEntryPath = substr($entryPath, strlen($this->getPath()));
380 380
 			// attach the permissions to propagate etag on permision changes of submounts
381 381
 			$permissions = isset($data['permissions']) ? $data['permissions'] : 0;
382
-			$this->childEtags[] = $relativeEntryPath . '/' . $data['etag'] . $permissions;
382
+			$this->childEtags[] = $relativeEntryPath.'/'.$data['etag'].$permissions;
383 383
 		}
384 384
 	}
385 385
 
Please login to merge, or discard this patch.
apps/dav/lib/Avatars/AvatarHome.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	public function getChild($name) {
60 60
 		$elements = pathinfo($name);
61 61
 		$ext = isset($elements['extension']) ? $elements['extension'] : '';
62
-		$size = (int)(isset($elements['filename']) ? $elements['filename'] : '64');
62
+		$size = (int) (isset($elements['filename']) ? $elements['filename'] : '64');
63 63
 		if (!in_array($ext, ['jpeg', 'png'], true)) {
64 64
 			throw new MethodNotAllowed('File format not allowed');
65 65
 		}
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			return [
79 79
 				$this->getChild('96.jpeg')
80 80
 			];
81
-		} catch(NotFound $exception) {
81
+		} catch (NotFound $exception) {
82 82
 			return [];
83 83
 		}
84 84
 	}
Please login to merge, or discard this patch.
apps/dav/lib/Avatars/AvatarNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 	public function getLastModified() {
90 90
 		$timestamp = $this->avatar->getFile($this->size)->getMTime();
91 91
 		if (!empty($timestamp)) {
92
-			return (int)$timestamp;
92
+			return (int) $timestamp;
93 93
 		}
94 94
 		return $timestamp;
95 95
 
Please login to merge, or discard this patch.
apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$output->startProgress(count($objects));
67 67
 		foreach ($objects as $row) {
68
-			$calObject = $this->calDavBackend->getCalendarObject((int)$row['calendarid'], $row['uri']);
69
-			$data = preg_replace('/' . $pattern . '/', ':', $calObject['calendardata']);
68
+			$calObject = $this->calDavBackend->getCalendarObject((int) $row['calendarid'], $row['uri']);
69
+			$data = preg_replace('/'.$pattern.'/', ':', $calObject['calendardata']);
70 70
 
71 71
 			if ($data !== $calObject['calendardata']) {
72 72
 				$output->advance();
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
 				} catch (InvalidDataException $e) {
77 77
 					$this->logger->info('Calendar object for calendar {cal} with uri {uri} still invalid', [
78 78
 						'app' => 'dav',
79
-						'cal' => (int)$row['calendarid'],
79
+						'cal' => (int) $row['calendarid'],
80 80
 						'uri' => $row['uri'],
81 81
 					]);
82 82
 					$warnings++;
83 83
 					continue;
84 84
 				}
85 85
 
86
-				$this->calDavBackend->updateCalendarObject((int)$row['calendarid'], $row['uri'], $data);
86
+				$this->calDavBackend->updateCalendarObject((int) $row['calendarid'], $row['uri'], $data);
87 87
 				$count++;
88 88
 			}
89 89
 		}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			->where($query->expr()->like(
105 105
 				'calendardata',
106 106
 				$query->createNamedParameter(
107
-					'%' . $this->db->escapeLikeParameter($pattern) . '%',
107
+					'%'.$this->db->escapeLikeParameter($pattern).'%',
108 108
 					IQueryBuilder::PARAM_STR
109 109
 				),
110 110
 				IQueryBuilder::PARAM_STR
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 		$reader->parseInnerTree();
40 40
 
41 41
 		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
42
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}comp-filter requires a valid name attribute');
43 43
 		}
44 44
 
45 45
 		return $componentName;
Please login to merge, or discard this patch.