Passed
Push — master ( f11659...ffd76d )
by Roeland
14:01
created
lib/private/App/AppStore/Fetcher/Fetcher.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	protected function fetch($ETag, $content) {
94 94
 		$appstoreenabled = $this->config->getSystemValue('appstoreenabled', true);
95
-		if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) {
95
+		if ((int) $this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) {
96 96
 			return [];
97 97
 		}
98 98
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		try {
115 115
 			$response = $client->get($this->getEndpoint(), $options);
116 116
 		} catch (ConnectException $e) {
117
-			$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string)time());
117
+			$this->config->setAppValue('settings', 'appstore-fetcher-lastFailure', (string) time());
118 118
 			throw $e;
119 119
 		}
120 120
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 				if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) {
168 168
 
169 169
 					// If the timestamp is older than 3600 seconds request the files new
170
-					if ((int)$jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
170
+					if ((int) $jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
171 171
 						return $jsonBlob['data'];
172 172
 					}
173 173
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			$file->putContent(json_encode($responseJson));
199 199
 			return json_decode($file->getContent(), true)['data'];
200 200
 		} catch (ConnectException $e) {
201
-			$this->logger->warning('Could not connect to appstore: ' . $e->getMessage(), ['app' => 'appstoreFetcher']);
201
+			$this->logger->warning('Could not connect to appstore: '.$e->getMessage(), ['app' => 'appstoreFetcher']);
202 202
 			return [];
203 203
 		} catch (\Exception $e) {
204 204
 			$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]);
@@ -245,6 +245,6 @@  discard block
 block discarded – undo
245 245
 	}
246 246
 
247 247
 	protected function getEndpoint(): string {
248
-		return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->endpointName;
248
+		return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1').'/'.$this->endpointName;
249 249
 	}
250 250
 }
Please login to merge, or discard this patch.