Passed
Push — master ( c5c219...cdd84d )
by Morris
12:06 queued 10s
created
lib/private/Files/Cache/QuerySearchHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function shouldJoinTags(ISearchOperator $operator) {
76 76
 		if ($operator instanceof ISearchBinaryOperator) {
77
-			return array_reduce($operator->getArguments(), function ($shouldJoin, ISearchOperator $operator) {
77
+			return array_reduce($operator->getArguments(), function($shouldJoin, ISearchOperator $operator) {
78 78
 				return $shouldJoin || $this->shouldJoinTags($operator);
79 79
 			}, false);
80 80
 		} else if ($operator instanceof ISearchComparison) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 * @param ISearchOperator $operator
89 89
 	 */
90 90
 	public function searchOperatorArrayToDBExprArray(IQueryBuilder $builder, array $operators) {
91
-		return array_map(function ($operator) use ($builder) {
91
+		return array_map(function($operator) use ($builder) {
92 92
 			return $this->searchOperatorToDBExpr($builder, $operator);
93 93
 		}, $operators);
94 94
 	}
@@ -109,12 +109,12 @@  discard block
 block discarded – undo
109 109
 				case ISearchBinaryOperator::OPERATOR_OR:
110 110
 					return call_user_func_array([$expr, 'orX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments()));
111 111
 				default:
112
-					throw new \InvalidArgumentException('Invalid operator type: ' . $operator->getType());
112
+					throw new \InvalidArgumentException('Invalid operator type: '.$operator->getType());
113 113
 			}
114 114
 		} else if ($operator instanceof ISearchComparison) {
115 115
 			return $this->searchComparisonToDBExpr($builder, $operator, self::$searchOperatorMap);
116 116
 		} else {
117
-			throw new \InvalidArgumentException('Invalid operator type: ' . get_class($operator));
117
+			throw new \InvalidArgumentException('Invalid operator type: '.get_class($operator));
118 118
 		}
119 119
 	}
120 120
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			$queryOperator = $operatorMap[$type];
127 127
 			return $builder->expr()->$queryOperator($field, $this->getParameterForValue($builder, $value));
128 128
 		} else {
129
-			throw new \InvalidArgumentException('Invalid operator type: ' . $comparison->getType());
129
+			throw new \InvalidArgumentException('Invalid operator type: '.$comparison->getType());
130 130
 		}
131 131
 	}
132 132
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 					$type = ISearchComparison::COMPARE_EQUAL;
146 146
 				}
147 147
 				if (strpos($value, '%') !== false) {
148
-					throw new \InvalidArgumentException('Unsupported query value for mimetype: ' . $value . ', only values in the format "mime/type" or "mime/%" are supported');
148
+					throw new \InvalidArgumentException('Unsupported query value for mimetype: '.$value.', only values in the format "mime/type" or "mime/%" are supported');
149 149
 				}
150 150
 			}
151 151
 		} else if ($field === 'favorite') {
@@ -178,14 +178,14 @@  discard block
 block discarded – undo
178 178
 		];
179 179
 
180 180
 		if (!isset($types[$operator->getField()])) {
181
-			throw new \InvalidArgumentException('Unsupported comparison field ' . $operator->getField());
181
+			throw new \InvalidArgumentException('Unsupported comparison field '.$operator->getField());
182 182
 		}
183 183
 		$type = $types[$operator->getField()];
184 184
 		if (gettype($operator->getValue()) !== $type) {
185
-			throw new \InvalidArgumentException('Invalid type for field ' . $operator->getField());
185
+			throw new \InvalidArgumentException('Invalid type for field '.$operator->getField());
186 186
 		}
187 187
 		if (!in_array($operator->getType(), $comparisons[$operator->getField()])) {
188
-			throw new \InvalidArgumentException('Unsupported comparison for field  ' . $operator->getField() . ': ' . $operator->getType());
188
+			throw new \InvalidArgumentException('Unsupported comparison for field  '.$operator->getField().': '.$operator->getType());
189 189
 		}
190 190
 	}
191 191
 
Please login to merge, or discard this patch.
apps/systemtags/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // WARNING: this should be moved to proper AppFramework handling
24 24
 // Check if we are a user
25 25
 if (!\OC::$server->getUserSession()->isLoggedIn()) {
26
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
26
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute(
27 27
 			'core.login.showLoginForm',
28 28
 			[
29 29
 				'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 }
35 35
 // Redirect to 2FA challenge selection if 2FA challenge was not solved yet
36 36
 if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
37
-	header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
37
+	header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
38 38
 	exit();
39 39
 }
40 40
 
Please login to merge, or discard this patch.
lib/private/Memcache/Factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return IMemcache
134 134
 	 */
135 135
 	public function createLocking(string $prefix = ''): IMemcache {
136
-		return new $this->lockingCacheClass($this->globalPrefix . '/' . $prefix);
136
+		return new $this->lockingCacheClass($this->globalPrefix.'/'.$prefix);
137 137
 	}
138 138
 
139 139
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return ICache
144 144
 	 */
145 145
 	public function createDistributed(string $prefix = ''): ICache {
146
-		return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
146
+		return new $this->distributedCacheClass($this->globalPrefix.'/'.$prefix);
147 147
 	}
148 148
 
149 149
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @return ICache
154 154
 	 */
155 155
 	public function createLocal(string $prefix = ''): ICache {
156
-		return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
156
+		return new $this->localCacheClass($this->globalPrefix.'/'.$prefix);
157 157
 	}
158 158
 
159 159
 	/**
Please login to merge, or discard this patch.
core/Controller/AvatarController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			if (!($node instanceof File)) {
173 173
 				return new JSONResponse(['data' => ['message' => $this->l->t('Please select a file.')]]);
174 174
 			}
175
-			if ($node->getSize() > 20*1024*1024) {
175
+			if ($node->getSize() > 20 * 1024 * 1024) {
176 176
 				return new JSONResponse(
177 177
 					['data' => ['message' => $this->l->t('File is too big')]],
178 178
 					Http::STATUS_BAD_REQUEST
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 				 is_uploaded_file($files['tmp_name'][0]) &&
201 201
 				!\OC\Files\Filesystem::isFileBlacklisted($files['tmp_name'][0])
202 202
 			) {
203
-				if ($files['size'][0] > 20*1024*1024) {
203
+				if ($files['size'][0] > 20 * 1024 * 1024) {
204 204
 					return new JSONResponse(
205 205
 						['data' => ['message' => $this->l->t('File is too big')]],
206 206
 						Http::STATUS_BAD_REQUEST
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 				Http::STATUS_OK,
293 293
 				['Content-Type' => $image->mimeType()]);
294 294
 
295
-		$resp->setETag((string)crc32($image->data()));
295
+		$resp->setETag((string) crc32($image->data()));
296 296
 		$resp->cacheFor(0);
297 297
 		$resp->setLastModified(new \DateTime('now', new \DateTimeZone('GMT')));
298 298
 		return $resp;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
 		$image = new \OC_Image();
327 327
 		$image->loadFromData($tmpAvatar);
328
-		$image->crop($crop['x'], $crop['y'], (int)round($crop['w']), (int)round($crop['h']));
328
+		$image->crop($crop['x'], $crop['y'], (int) round($crop['w']), (int) round($crop['h']));
329 329
 		try {
330 330
 			$avatar = $this->avatarManager->getAvatar($this->userId);
331 331
 			$avatar->set($image);
Please login to merge, or discard this patch.
lib/private/Collaboration/Collaborators/UserPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 
152 152
 	public function takeOutCurrentUser(array &$users) {
153 153
 		$currentUser = $this->userSession->getUser();
154
-		if(!is_null($currentUser)) {
154
+		if (!is_null($currentUser)) {
155 155
 			if (isset($users[$currentUser->getUID()])) {
156 156
 				unset($users[$currentUser->getUID()]);
157 157
 			}
Please login to merge, or discard this patch.
lib/public/Authentication/TwoFactorAuth/IProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 	/**
34 34
 	 * @since 14.0.0
35 35
 	 */
36
-	const EVENT_SUCCESS = self::class . '::success';
37
-	const EVENT_FAILED  = self::class . '::failed';
36
+	const EVENT_SUCCESS = self::class.'::success';
37
+	const EVENT_FAILED  = self::class.'::failed';
38 38
 
39 39
 	/**
40 40
 	 * Get unique identifier of this 2FA provider
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$storedPassword = $share->getPassword();
151 151
 		$authenticated = $this->session->get('public_link_authenticated') === $share->getId() ||
152 152
 			$this->shareManager->checkPassword($share, $password);
153
-		if (!empty($storedPassword) && !$authenticated ) {
153
+		if (!empty($storedPassword) && !$authenticated) {
154 154
 			$response = new JSONResponse(
155 155
 				['message' => 'No permission to access the share'],
156 156
 				Http::STATUS_BAD_REQUEST
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$httpClient = $this->clientService->newClient();
199 199
 
200 200
 		try {
201
-			$response = $httpClient->post($remote . '/index.php/apps/federatedfilesharing/createFederatedShare',
201
+			$response = $httpClient->post($remote.'/index.php/apps/federatedfilesharing/createFederatedShare',
202 202
 				[
203 203
 					'body' =>
204 204
 						[
Please login to merge, or discard this patch.
apps/federation/lib/TrustedServers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		$client = $this->httpClientService->newClient();
231 231
 		try {
232 232
 			$result = $client->get(
233
-				$url . '/status.php',
233
+				$url.'/status.php',
234 234
 				[
235 235
 					'timeout' => 3,
236 236
 					'connect_timeout' => 3,
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 
287 287
 		}
288 288
 
289
-		return 'https://' . $url;
289
+		return 'https://'.$url;
290 290
 	}
291 291
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Service/StoragesService.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,17 +72,17 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	protected function getStorageConfigFromDBMount(array $mount) {
75
-		$applicableUsers = array_filter($mount['applicable'], function ($applicable) {
75
+		$applicableUsers = array_filter($mount['applicable'], function($applicable) {
76 76
 			return $applicable['type'] === DBConfigService::APPLICABLE_TYPE_USER;
77 77
 		});
78
-		$applicableUsers = array_map(function ($applicable) {
78
+		$applicableUsers = array_map(function($applicable) {
79 79
 			return $applicable['value'];
80 80
 		}, $applicableUsers);
81 81
 
82
-		$applicableGroups = array_filter($mount['applicable'], function ($applicable) {
82
+		$applicableGroups = array_filter($mount['applicable'], function($applicable) {
83 83
 			return $applicable['type'] === DBConfigService::APPLICABLE_TYPE_GROUP;
84 84
 		});
85
-		$applicableGroups = array_map(function ($applicable) {
85
+		$applicableGroups = array_map(function($applicable) {
86 86
 			return $applicable['value'];
87 87
 		}, $applicableGroups);
88 88
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 				$mount['priority']
99 99
 			);
100 100
 			$config->setType($mount['type']);
101
-			$config->setId((int)$mount['mount_id']);
101
+			$config->setId((int) $mount['mount_id']);
102 102
 			return $config;
103 103
 		} catch (\UnexpectedValueException $e) {
104 104
 			// don't die if a storage backend doesn't exist
@@ -126,11 +126,11 @@  discard block
 block discarded – undo
126 126
 	protected function readConfig() {
127 127
 		$mounts = $this->readDBConfig();
128 128
 		$configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts);
129
-		$configs = array_filter($configs, function ($config) {
129
+		$configs = array_filter($configs, function($config) {
130 130
 			return $config instanceof StorageConfig;
131 131
 		});
132 132
 
133
-		$keys = array_map(function (StorageConfig $config) {
133
+		$keys = array_map(function(StorageConfig $config) {
134 134
 			return $config->getId();
135 135
 		}, $configs);
136 136
 
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 		$mount = $this->dbConfig->getMountById($id);
150 150
 
151 151
 		if (!is_array($mount)) {
152
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
152
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
153 153
 		}
154 154
 
155 155
 		$config = $this->getStorageConfigFromDBMount($mount);
156 156
 		if ($this->isApplicable($config)) {
157 157
 			return $config;
158 158
 		} else {
159
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
159
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
160 160
 		}
161 161
 	}
162 162
 
@@ -379,13 +379,13 @@  discard block
 block discarded – undo
379 379
 		$existingMount = $this->dbConfig->getMountById($id);
380 380
 
381 381
 		if (!is_array($existingMount)) {
382
-			throw new NotFoundException('Storage with ID "' . $id . '" not found while updating storage');
382
+			throw new NotFoundException('Storage with ID "'.$id.'" not found while updating storage');
383 383
 		}
384 384
 
385 385
 		$oldStorage = $this->getStorageConfigFromDBMount($existingMount);
386 386
 
387 387
 		if ($oldStorage->getBackend() instanceof InvalidBackend) {
388
-			throw new NotFoundException('Storage with id "' . $id . '" cannot be edited due to missing backend');
388
+			throw new NotFoundException('Storage with id "'.$id.'" cannot be edited due to missing backend');
389 389
 		}
390 390
 
391 391
 		$removedUsers = array_diff($oldStorage->getApplicableUsers(), $updatedStorage->getApplicableUsers());
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		$existingMount = $this->dbConfig->getMountById($id);
463 463
 
464 464
 		if (!is_array($existingMount)) {
465
-			throw new NotFoundException('Storage with ID "' . $id . '" not found');
465
+			throw new NotFoundException('Storage with ID "'.$id.'" not found');
466 466
 		}
467 467
 
468 468
 		$this->dbConfig->removeMount($id);
Please login to merge, or discard this patch.