Completed
Push — master ( bf476c...b09631 )
by Maxence
02:44
created
tests/unit/lib/Api/CirclesTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -861,7 +861,7 @@
 block discarded – undo
861 861
 	/**
862 862
 	 * function to generate admin/moderator/member and assigning them their level.
863 863
 	 *
864
-	 * @param $circleId
864
+	 * @param integer $circleId
865 865
 	 * @param bool $isClosed
866 866
 	 *
867 867
 	 * @throws QueryException
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 			} catch (Exception $e) {
332 332
 				$this->assertSame(
333 333
 					true, false,
334
-					'should have returned a MemberIsNotModeratorException - ' . $e->getMessage()
334
+					'should have returned a MemberIsNotModeratorException - '.$e->getMessage()
335 335
 				);
336 336
 			}
337 337
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			} catch (Exception $e) {
346 346
 				$this->assertSame(
347 347
 					true, false,
348
-					'should have returned a MemberIsNotModeratorException - ' . $e->getMessage()
348
+					'should have returned a MemberIsNotModeratorException - '.$e->getMessage()
349 349
 				);
350 350
 			}
351 351
 
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 	define('PHPUNIT_RUN', 1);
8 8
 }
9 9
 
10
-require_once __DIR__ . '/../../../lib/base.php';
10
+require_once __DIR__.'/../../../lib/base.php';
11 11
 
12 12
 // Fix for "Autoload path not allowed: .../tests/lib/testcase.php"
13
-\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
13
+\OC::$loader->addValidRoot(OC::$SERVERROOT.'/tests');
14 14
 
15 15
 \OC_App::loadApp(Application::APP_ID);
16 16
 
Please login to merge, or discard this patch.
templates/files/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
 		<tr>
19 19
 			<th id='headerName' class="hidden column-name">
20 20
 				<div id="headerName-container">
21
-					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
21
+					<a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a>
22 22
 				</div>
23 23
 			</th>
24 24
 			<th id="headerSize" class="hidden column-size">
25 25
 				<a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
26 26
 			</th>
27 27
 			<th id="headerDate" class="hidden column-mtime">
28
-				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a>
28
+				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
29 29
 			</th>
30 30
 		</tr>
31 31
 	</thead>
Please login to merge, or discard this patch.
lib/Command/CirclesDestroy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 		} catch (FederatedItemException $e) {
126 126
 			if ($input->getOption('status-code')) {
127 127
 				throw new FederatedItemException(
128
-					' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage()
128
+					' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage()
129 129
 				);
130 130
 			}
131 131
 
Please login to merge, or discard this patch.
lib/Command/MembersAdd.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 		} catch (FederatedItemException $e) {
140 140
 			if ($input->getOption('status-code')) {
141 141
 				throw new FederatedItemException(
142
-					' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage()
142
+					' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage()
143 143
 				);
144 144
 			}
145 145
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 				$instance = $host;
198 198
 			}
199 199
 
200
-			$result[] = $user['userid']['value'] . ' <info>@' . $host . '</info>';
200
+			$result[] = $user['userid']['value'].' <info>@'.$host.'</info>';
201 201
 		}
202 202
 
203 203
 //		if ($userId === '') {
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -31,11 +31,7 @@
 block discarded – undo
31 31
 
32 32
 namespace OCA\Circles\Command;
33 33
 
34
-use ArtificialOwl\MySmallPhpTools\Exceptions\RequestContentException;
35
-use ArtificialOwl\MySmallPhpTools\Exceptions\RequestNetworkException;
36 34
 use ArtificialOwl\MySmallPhpTools\Exceptions\RequestResultNotJsonException;
37
-use ArtificialOwl\MySmallPhpTools\Exceptions\RequestResultSizeException;
38
-use ArtificialOwl\MySmallPhpTools\Exceptions\RequestServerException;
39 35
 use ArtificialOwl\MySmallPhpTools\Model\Nextcloud\nc22\NC22Request;
40 36
 use ArtificialOwl\MySmallPhpTools\Model\Request;
41 37
 use Exception;
Please login to merge, or discard this patch.
lib/Command/CirclesConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		} catch (FederatedItemException $e) {
145 145
 			if ($input->getOption('status-code')) {
146 146
 				throw new FederatedItemException(
147
-					' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage()
147
+					' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage()
148 148
 				);
149 149
 			}
150 150
 
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 			$value = array_search(strtoupper($item), $valid);
177 177
 			if (!$value) {
178 178
 				throw new InvalidArgumentException(
179
-					'Invalid config \'' . $item . '\'. Available values: '
180
-					. implode(', ', array_values($valid)) . '. '
179
+					'Invalid config \''.$item.'\'. Available values: '
180
+					. implode(', ', array_values($valid)).'. '
181 181
 					. 'To disable a config, start the value with an underscore'
182 182
 				);
183 183
 			}
Please login to merge, or discard this patch.
lib/Command/SharesFiles.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 				$recipient = $share->getInitiator();
223 223
 				$sharedTo = $recipient->getDisplayName();
224 224
 				if (!$this->configService->isLocalInstance($recipient->getInstance())) {
225
-					$sharedTo .= '@' . $recipient->getInstance();
225
+					$sharedTo .= '@'.$recipient->getInstance();
226 226
 				}
227 227
 			}
228 228
 			$circle = $share->getCircle();
@@ -232,15 +232,15 @@  discard block
 block discarded – undo
232 232
 				$share->getShareOwner(),
233 233
 				$share->getFileTarget(),
234 234
 				$share->getSharedBy(),
235
-				$circle->getDisplayName() . ' (' . $share->getSharedWith()
236
-				. ', ' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'
235
+				$circle->getDisplayName().' ('.$share->getSharedWith()
236
+				. ', '.Circle::$DEF_SOURCE[$circle->getSource()].')'
237 237
 			];
238 238
 
239 239
 			if (!$filterRecipient) {
240 240
 				$row = array_merge(
241 241
 					$row, [
242
-							$sharedTo . ' (' . $recipient->getSingleId() . ', '
243
-							. Circle::$DEF_SOURCE[$recipient->getBasedOn()->getSource()] . ')',
242
+							$sharedTo.' ('.$recipient->getSingleId().', '
243
+							. Circle::$DEF_SOURCE[$recipient->getBasedOn()->getSource()].')',
244 244
 							(($share->getChildId() > 0) ? $share->getChildFileTarget(
245 245
 							) : $share->getFileTarget()),
246 246
 						]
Please login to merge, or discard this patch.
lib/Command/CirclesMemberships.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -213,10 +213,10 @@  discard block
 block discarded – undo
213 213
 			return 0;
214 214
 		}
215 215
 
216
-		$output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>');
217
-		$output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>');
218
-		$output->writeln('Type: <info>' . Member::$TYPE[$federatedUser->getUserType()] . '</info>');
219
-		$output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>');
216
+		$output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>');
217
+		$output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>');
218
+		$output->writeln('Type: <info>'.Member::$TYPE[$federatedUser->getUserType()].'</info>');
219
+		$output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>');
220 220
 
221 221
 		$output->writeln('');
222 222
 		$output->writeln('Memberships:');
@@ -225,14 +225,14 @@  discard block
 block discarded – undo
225 225
 		if ($count === 0) {
226 226
 			$output->writeln('(database not updated)');
227 227
 		} else {
228
-			$output->writeln('(' . $count . ' entries generated/updated in the database)');
228
+			$output->writeln('('.$count.' entries generated/updated in the database)');
229 229
 		}
230 230
 
231 231
 		foreach ($federatedUser->getMemberships() as $membership) {
232 232
 			$this->memberships[$membership->getCircleId()] = $membership;
233 233
 			$output->writeln(
234
-				'- <info>' . $membership->getCircleId() . '</info> ('
235
-				. Member::$DEF_LEVEL[$membership->getLevel()] . ')'
234
+				'- <info>'.$membership->getCircleId().'</info> ('
235
+				. Member::$DEF_LEVEL[$membership->getLevel()].')'
236 236
 			);
237 237
 		}
238 238
 
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
 				if ($lineNumber === 2) {
306 306
 					return '';
307 307
 				}
308
-				$line .= '<info>' . $federatedUser->getSingleId() . '</info>';
308
+				$line .= '<info>'.$federatedUser->getSingleId().'</info>';
309 309
 				if (!$this->configService->isLocalInstance($federatedUser->getInstance())) {
310
-					$line .= '@' . $federatedUser->getInstance();
310
+					$line .= '@'.$federatedUser->getInstance();
311 311
 				}
312 312
 
313 313
 				return $line;
@@ -319,28 +319,28 @@  discard block
 block discarded – undo
319 319
 				$circle = $member->getCircle();
320 320
 
321 321
 				if ($lineNumber === 1) {
322
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
322
+					$line .= '<info>'.$circle->getSingleId().'</info>';
323 323
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
324
-						$line .= '@' . $circle->getInstance();
324
+						$line .= '@'.$circle->getInstance();
325 325
 					}
326
-					$line .= ' (' . ($this->input->getOption('display-name') ?
327
-							$circle->getDisplayName() : $circle->getName()) . ')';
328
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
329
-					$line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()];
326
+					$line .= ' ('.($this->input->getOption('display-name') ?
327
+							$circle->getDisplayName() : $circle->getName()).')';
328
+					$line .= ' <info>MemberId</info>: '.$member->getId();
329
+					$line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()];
330 330
 
331 331
 					$knownMembership = $this->memberships[$member->getCircleId()];
332 332
 					if ($member->getLevel() !== $knownMembership->getLevel()) {
333
-						$line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')';
333
+						$line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')';
334 334
 					}
335 335
 				}
336 336
 				if ($lineNumber === 2) {
337 337
 					$owner = $circle->getOwner();
338
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
338
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
339 339
 					if ($owner->hasBasedOn()) {
340
-						$line .= ' (' . Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()] . ') ';
340
+						$line .= ' ('.Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()].') ';
341 341
 					}
342 342
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
343
-					$line .= ($type === '') ? '' : '<info>Config</info>: ' . $type;
343
+					$line .= ($type === '') ? '' : '<info>Config</info>: '.$type;
344 344
 				}
345 345
 
346 346
 				return $line;
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 			);
398 398
 		}
399 399
 
400
-		$output->writeln($count . ' memberships updated');
400
+		$output->writeln($count.' memberships updated');
401 401
 	}
402 402
 
403 403
 }
Please login to merge, or discard this patch.
lib/Controller/LocalController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
 					throw new OCSException('works only from local instance', 404);
195 195
 				}
196 196
 
197
-				$userId = $currentUser->getUserId() . '/' . $userId;
197
+				$userId = $currentUser->getUserId().'/'.$userId;
198 198
 			}
199 199
 
200 200
 			$federatedUser = $this->federatedUserService->generateFederatedUser($userId, $type);
Please login to merge, or discard this patch.