Passed
Push — master ( 2f5810...da025d )
by Roeland
16:11 queued 04:02
created
settings/BackgroundJobs/VerifyUserData.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 
114 114
 	protected function run($argument) {
115 115
 
116
-		$try = (int)$argument['try'] + 1;
116
+		$try = (int) $argument['try'] + 1;
117 117
 
118
-		switch($argument['type']) {
118
+		switch ($argument['type']) {
119 119
 			case AccountManager::PROPERTY_WEBSITE:
120 120
 				$result = $this->verifyWebsite($argument);
121 121
 				break;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 				break;
126 126
 			default:
127 127
 				// no valid type given, no need to retry
128
-				$this->logger->error($argument['type'] . ' is no valid type for user account data.');
128
+				$this->logger->error($argument['type'].' is no valid type for user account data.');
129 129
 				$result = true;
130 130
 		}
131 131
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 		$result = false;
146 146
 
147
-		$url = rtrim($argument['data'], '/') . '/.well-known/' . 'CloudIdVerificationCode.txt';
147
+		$url = rtrim($argument['data'], '/').'/.well-known/'.'CloudIdVerificationCode.txt';
148 148
 
149 149
 		$client = $this->httpClientService->newClient();
150 150
 		try {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 			$user = $this->userManager->get($argument['uid']);
162 162
 			// we don't check a valid user -> give up
163 163
 			if ($user === null) {
164
-				$this->logger->error($argument['uid'] . ' doesn\'t exist, can\'t verify user data.');
164
+				$this->logger->error($argument['uid'].' doesn\'t exist, can\'t verify user data.');
165 165
 				return $result;
166 166
 			}
167 167
 			$userData = $this->accountManager->getUser($user);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * @return bool true if we could check the verification code, otherwise false
187 187
 	 */
188 188
 	protected function verifyViaLookupServer(array $argument, $dataType) {
189
-		if(empty($this->lookupServerUrl) ||
189
+		if (empty($this->lookupServerUrl) ||
190 190
 			$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' ||
191 191
 			$this->config->getSystemValue('has_internet_connection', true) === false) {
192 192
 			return false;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 		// we don't check a valid user -> give up
198 198
 		if ($user === null) {
199
-			$this->logger->info($argument['uid'] . ' doesn\'t exist, can\'t verify user data.');
199
+			$this->logger->info($argument['uid'].' doesn\'t exist, can\'t verify user data.');
200 200
 			return true;
201 201
 		}
202 202
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		try {
236 236
 			$client = $this->httpClientService->newClient();
237 237
 			$response = $client->get(
238
-				$this->lookupServerUrl . '/users?search=' . urlencode($cloudId) . '&exactCloudId=1',
238
+				$this->lookupServerUrl.'/users?search='.urlencode($cloudId).'&exactCloudId=1',
239 239
 				[
240 240
 					'timeout' => 10,
241 241
 					'connect_timeout' => 3,
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 				'data' => $argument['data'],
269 269
 				'type' => $argument['type'],
270 270
 				'uid' => $argument['uid'],
271
-				'try' => (int)$argument['try'] + 1,
271
+				'try' => (int) $argument['try'] + 1,
272 272
 				'lastRun' => time()
273 273
 			]
274 274
 		);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 * @return bool
282 282
 	 */
283 283
 	protected function shouldRun(array $argument) {
284
-		$lastRun = (int)$argument['lastRun'];
284
+		$lastRun = (int) $argument['lastRun'];
285 285
 		return ((time() - $lastRun) > $this->interval);
286 286
 	}
287 287
 
Please login to merge, or discard this patch.