Passed
Push — master ( 3c2dd0...7c6e77 )
by Robin
10:46 queued 14s
created
lib/public/Group/Backend/ABackend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,6 +62,6 @@
 block discarded – undo
62 62
 			$implements |= GroupInterface::REMOVE_FROM_GOUP;
63 63
 		}
64 64
 
65
-		return (bool)($actions & $implements);
65
+		return (bool) ($actions & $implements);
66 66
 	}
67 67
 }
Please login to merge, or discard this patch.
apps/federation/lib/BackgroundJob/RequestSharedSecret.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	protected function run($argument) {
155 155
 
156 156
 		$target = $argument['url'];
157
-		$created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime();
157
+		$created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime();
158 158
 		$currentTime = $this->timeFactory->getTime();
159 159
 		$source = $this->urlGenerator->getAbsoluteURL('/');
160 160
 		$source = rtrim($source, '/');
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		$endPoint = isset($endPoints['shared-secret']) ? $endPoints['shared-secret'] : $this->defaultEndPoint;
173 173
 
174 174
 		// make sure that we have a well formated url
175
-		$url = rtrim($target, '/') . '/' . trim($endPoint, '/');
175
+		$url = rtrim($target, '/').'/'.trim($endPoint, '/');
176 176
 
177 177
 		try {
178 178
 			$result = $this->httpClient->post(
@@ -193,16 +193,16 @@  discard block
 block discarded – undo
193 193
 		} catch (ClientException $e) {
194 194
 			$status = $e->getCode();
195 195
 			if ($status === Http::STATUS_FORBIDDEN) {
196
-				$this->logger->info($target . ' refused to ask for a shared secret.', ['app' => 'federation']);
196
+				$this->logger->info($target.' refused to ask for a shared secret.', ['app' => 'federation']);
197 197
 			} else {
198
-				$this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']);
198
+				$this->logger->info($target.' responded with a '.$status.' containing: '.$e->getMessage(), ['app' => 'federation']);
199 199
 			}
200 200
 		} catch (RequestException $e) {
201 201
 			$status = -1; // There is no status code if we could not connect
202
-			$this->logger->info('Could not connect to ' . $target, ['app' => 'federation']);
202
+			$this->logger->info('Could not connect to '.$target, ['app' => 'federation']);
203 203
 		} catch (RingException $e) {
204 204
 			$status = -1; // There is no status code if we could not connect
205
-			$this->logger->info('Could not connect to ' . $target, ['app' => 'federation']);
205
+			$this->logger->info('Could not connect to '.$target, ['app' => 'federation']);
206 206
 		} catch (\Exception $e) {
207 207
 			$status = Http::STATUS_INTERNAL_SERVER_ERROR;
208 208
 			$this->logger->logException($e, ['app' => 'federation']);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	protected function reAddJob(array $argument) {
227 227
 		$url = $argument['url'];
228
-		$created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime();
228
+		$created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime();
229 229
 		$token = $argument['token'];
230 230
 
231 231
 		$this->jobList->add(
Please login to merge, or discard this patch.
lib/private/DateTimeZone.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		try {
66 66
 			return new \DateTimeZone($timeZone);
67 67
 		} catch (\Exception $e) {
68
-			\OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", ILogger::DEBUG);
68
+			\OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "'.$timeZone."'", ILogger::DEBUG);
69 69
 			return new \DateTimeZone($this->getDefaultTimeZone());
70 70
 		}
71 71
 	}
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 			// so a positive offset means negative timeZone
87 87
 			// and the other way around.
88 88
 			if ($offset > 0) {
89
-				$timeZone = 'Etc/GMT-' . $offset;
89
+				$timeZone = 'Etc/GMT-'.$offset;
90 90
 			} else {
91
-				$timeZone = 'Etc/GMT+' . abs($offset);
91
+				$timeZone = 'Etc/GMT+'.abs($offset);
92 92
 			}
93 93
 
94 94
 			return new \DateTimeZone($timeZone);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			}
111 111
 
112 112
 			// No timezone found, fallback to UTC
113
-			\OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", ILogger::DEBUG);
113
+			\OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "'.$offset."'", ILogger::DEBUG);
114 114
 			return new \DateTimeZone($this->getDefaultTimeZone());
115 115
 		}
116 116
 	}
Please login to merge, or discard this patch.
lib/private/Files/Mount/MountPoint.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 		} else {
107 107
 			// Update old classes to new namespace
108 108
 			if (strpos($storage, 'OC_Filestorage_') !== false) {
109
-				$storage = '\OC\Files\Storage\\' . substr($storage, 15);
109
+				$storage = '\OC\Files\Storage\\'.substr($storage, 15);
110 110
 			}
111 111
 			$this->class = $storage;
112 112
 			$this->arguments = $arguments;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 				return;
159 159
 			}
160 160
 		} else {
161
-			\OCP\Util::writeLog('core', 'storage backend ' . $this->class . ' not found', ILogger::ERROR);
161
+			\OCP\Util::writeLog('core', 'storage backend '.$this->class.' not found', ILogger::ERROR);
162 162
 			$this->invalidStorage = true;
163 163
 			return;
164 164
 		}
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
 	 */
209 209
 	public function getInternalPath($path) {
210 210
 		$path = Filesystem::normalizePath($path, true, false, true);
211
-		if ($this->mountPoint === $path or $this->mountPoint . '/' === $path) {
211
+		if ($this->mountPoint === $path or $this->mountPoint.'/' === $path) {
212 212
 			$internalPath = '';
213 213
 		} else {
214 214
 			$internalPath = substr($path, strlen($this->mountPoint));
215 215
 		}
216 216
 		// substr returns false instead of an empty string, we always want a string
217
-		return (string)$internalPath;
217
+		return (string) $internalPath;
218 218
 	}
219 219
 
220 220
 	/**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public function getStorageRootId() {
269 269
 		if (is_null($this->rootId)) {
270
-			$this->rootId = (int)$this->getStorage()->getCache()->getId('');
270
+			$this->rootId = (int) $this->getStorage()->getCache()->getId('');
271 271
 		}
272 272
 		return $this->rootId;
273 273
 	}
Please login to merge, or discard this patch.
lib/public/Log/IFileBased.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,5 +39,5 @@
 block discarded – undo
39 39
 	/**
40 40
 	 * @since 14.0.0
41 41
 	 */
42
-	public function getEntries(int $limit=50, int $offset=0): array;
42
+	public function getEntries(int $limit = 50, int $offset = 0): array;
43 43
 }
Please login to merge, or discard this patch.
apps/federation/lib/BackgroundJob/GetSharedSecret.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
 	protected function run($argument) {
147 147
 		$target = $argument['url'];
148
-		$created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime();
148
+		$created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime();
149 149
 		$currentTime = $this->timeFactory->getTime();
150 150
 		$source = $this->urlGenerator->getAbsoluteURL('/');
151 151
 		$source = rtrim($source, '/');
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		$deadline = $currentTime - $this->maxLifespan;
156 156
 		if ($created < $deadline) {
157 157
 			$this->retainJob = false;
158
-			$this->trustedServers->setServerStatus($target,TrustedServers::STATUS_FAILURE);
158
+			$this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
159 159
 			return;
160 160
 		}
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		$endPoint = isset($endPoints['shared-secret']) ? $endPoints['shared-secret'] : $this->defaultEndPoint;
164 164
 
165 165
 		// make sure that we have a well formatted url
166
-		$url = rtrim($target, '/') . '/' . trim($endPoint, '/');
166
+		$url = rtrim($target, '/').'/'.trim($endPoint, '/');
167 167
 
168 168
 		$result = null;
169 169
 		try {
@@ -186,21 +186,21 @@  discard block
 block discarded – undo
186 186
 		} catch (ClientException $e) {
187 187
 			$status = $e->getCode();
188 188
 			if ($status === Http::STATUS_FORBIDDEN) {
189
-				$this->logger->info($target . ' refused to exchange a shared secret with you.', ['app' => 'federation']);
189
+				$this->logger->info($target.' refused to exchange a shared secret with you.', ['app' => 'federation']);
190 190
 			} else {
191
-				$this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage(), ['app' => 'federation']);
191
+				$this->logger->info($target.' responded with a '.$status.' containing: '.$e->getMessage(), ['app' => 'federation']);
192 192
 			}
193 193
 		} catch (RequestException $e) {
194 194
 			$status = -1; // There is no status code if we could not connect
195 195
 			$this->logger->logException($e, [
196
-				'message' => 'Could not connect to ' . $target,
196
+				'message' => 'Could not connect to '.$target,
197 197
 				'level' => ILogger::INFO,
198 198
 				'app' => 'federation',
199 199
 			]);
200 200
 		} catch (RingException $e) {
201 201
 			$status = -1; // There is no status code if we could not connect
202 202
 			$this->logger->logException($e, [
203
-				'message' => 'Could not connect to ' . $target,
203
+				'message' => 'Could not connect to '.$target,
204 204
 				'level' => ILogger::INFO,
205 205
 				'app' => 'federation',
206 206
 			]);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 				);
228 228
 			} else {
229 229
 				$this->logger->error(
230
-						'remote server "' . $target . '"" does not return a valid shared secret. Received data: ' . $body,
230
+						'remote server "'.$target.'"" does not return a valid shared secret. Received data: '.$body,
231 231
 						['app' => 'federation']
232 232
 				);
233 233
 				$this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	 */
244 244
 	protected function reAddJob(array $argument) {
245 245
 		$url = $argument['url'];
246
-		$created = isset($argument['created']) ? (int)$argument['created'] : $this->timeFactory->getTime();
246
+		$created = isset($argument['created']) ? (int) $argument['created'] : $this->timeFactory->getTime();
247 247
 		$token = $argument['token'];
248 248
 		$this->jobList->add(
249 249
 			GetSharedSecret::class,
Please login to merge, or discard this patch.
lib/public/Log/RotationTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@
 block discarded – undo
59 59
 	 * @since 14.0.0
60 60
 	 */
61 61
 	protected function shouldRotateBySize():bool {
62
-		if ((int)$this->maxSize > 0) {
62
+		if ((int) $this->maxSize > 0) {
63 63
 			$filesize = @filesize($this->filePath);
64
-			if ($filesize >= (int)$this->maxSize) {
64
+			if ($filesize >= (int) $this->maxSize) {
65 65
 				return true;
66 66
 			}
67 67
 		}
Please login to merge, or discard this patch.
apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	private $mapper;
37 37
 
38 38
 	public function __construct(ITimeFactory $timeFactory, DirectMapper $mapper) {
39
-		$this->setInterval(60*60*24);
39
+		$this->setInterval(60 * 60 * 24);
40 40
 
41 41
 		$this->timeFactory = $timeFactory;
42 42
 		$this->mapper = $mapper;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 	protected function run($argument) {
46 46
 		// Delete all shares expired 24 hours ago
47
-		$this->mapper->deleteExpired($this->timeFactory->getTime() - 60*60*24);
47
+		$this->mapper->deleteExpired($this->timeFactory->getTime() - 60 * 60 * 24);
48 48
 	}
49 49
 
50 50
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1005Date20180413093149.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 		if (!$schema->hasTable('directlink')) {
46 46
 			$table = $schema->createTable('directlink');
47 47
 
48
-			$table->addColumn('id',Type::BIGINT, [
48
+			$table->addColumn('id', Type::BIGINT, [
49 49
 				'autoincrement' => true,
50 50
 				'notnull' => true,
51 51
 				'length' => 11,
Please login to merge, or discard this patch.