Completed
Pull Request — master (#1148)
by Maxence
40s
created
lib/Tools/Traits/TStringTools.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			return $line;
110 110
 		}
111 111
 
112
-		return substr($line, 0, $length - 5) . ' [..]';
112
+		return substr($line, 0, $length - 5).' [..]';
113 113
 	}
114 114
 
115 115
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 		$length = $length + 5;
130 130
 
131 131
 		return array_map(
132
-			function ($value) use ($flag, $length, &$c) {
132
+			function($value) use ($flag, $length, &$c) {
133 133
 				$n = $value;
134 134
 				if (($flag & $c) !== 0) {
135 135
 					$n = $this->cut($value, $length);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	protected function feedStringWithParams(string $line, array $params): string {
178 178
 		$ak = array_keys($params);
179 179
 		foreach ($ak as $k) {
180
-			$line = str_replace('{' . $k . '}', (string)$params[$k], $line);
180
+			$line = str_replace('{'.$k.'}', (string)$params[$k], $line);
181 181
 		}
182 182
 
183 183
 		return $line;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 		$s = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];
232 232
 		$e = floor(log($bytes, 1024));
233 233
 
234
-		return round($bytes / pow(1024, $e), 2) . ' ' . $s[$e];
234
+		return round($bytes / pow(1024, $e), 2).' '.$s[$e];
235 235
 	}
236 236
 
237 237
 
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
 			$second = time();
255 255
 		}
256 256
 
257
-		$f = new DateTime('@' . $first);
258
-		$s = new DateTime('@' . $second);
257
+		$f = new DateTime('@'.$first);
258
+		$s = new DateTime('@'.$second);
259 259
 		$duration = $second - $first;
260 260
 		if ($short) {
261 261
 			$minutes = $this->get('minutes', $words, 'M');
@@ -263,16 +263,16 @@  discard block
 block discarded – undo
263 263
 			$days = $this->get('days', $words, 'D');
264 264
 
265 265
 			if ($duration < 60) {
266
-				return $f->diff($s)->format('<1' . $minutes);
266
+				return $f->diff($s)->format('<1'.$minutes);
267 267
 			}
268 268
 			if ($duration < 3600) {
269
-				return $f->diff($s)->format('%i' . $minutes);
269
+				return $f->diff($s)->format('%i'.$minutes);
270 270
 			}
271 271
 			if ($duration < 86400) {
272
-				return $f->diff($s)->format('%h' . $hours . ', %i' . $minutes);
272
+				return $f->diff($s)->format('%h'.$hours.', %i'.$minutes);
273 273
 			}
274 274
 
275
-			return $f->diff($s)->format('%a' . $days . ', %h' . $hours . ', %i' . $minutes);
275
+			return $f->diff($s)->format('%a'.$days.', %h'.$hours.', %i'.$minutes);
276 276
 		}
277 277
 
278 278
 		$seconds = $this->get('seconds', $words, 'seconds');
@@ -280,22 +280,22 @@  discard block
 block discarded – undo
280 280
 		$hours = $this->get('hours', $words, 'hours');
281 281
 		$days = $this->get('days', $words, 'days');
282 282
 		if ($duration < 60) {
283
-			return $f->diff($s)->format('%s ' . $seconds);
283
+			return $f->diff($s)->format('%s '.$seconds);
284 284
 		}
285 285
 
286 286
 		if ($duration < 3600) {
287
-			return $f->diff($s)->format('%i ' . $minutes . ' and %s ' . $seconds);
287
+			return $f->diff($s)->format('%i '.$minutes.' and %s '.$seconds);
288 288
 		}
289 289
 
290 290
 		if ($duration < 86400) {
291
-			return $f->diff($s)->format('%h ' . $hours . ', %i ' . $minutes . ' and %s ' . $seconds);
291
+			return $f->diff($s)->format('%h '.$hours.', %i '.$minutes.' and %s '.$seconds);
292 292
 		}
293 293
 
294 294
 		return $f->diff($s)->format(
295
-			'%a ' . $days .
296
-			', %h ' . $hours .
297
-			', %i ' . $minutes .
298
-			' and %s ' . $seconds
295
+			'%a '.$days.
296
+			', %h '.$hours.
297
+			', %i '.$minutes.
298
+			' and %s '.$seconds
299 299
 		);
300 300
 	}
301 301
 }
Please login to merge, or discard this patch.
lib/Command/MembersList.php 1 patch
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
188 188
 			$circle = $this->circleService->getCircle($circleId);
189 189
 
190
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
190
+			$output->writeln('<info>Name</info>: '.$circle->getName());
191 191
 			$owner = $circle->getOwner();
192
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
192
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
193 193
 			$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
194
-			$output->writeln('<info>Config</info>: ' . $type);
194
+			$output->writeln('<info>Config</info>: '.$type);
195 195
 			$output->writeln(' ');
196 196
 
197 197
 			$tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -259,8 +259,7 @@  discard block
 block discarded – undo
259 259
 							), 40
260 260
 						),
261 261
 						$this->configService->displayInstance($member->getInstance()),
262
-						($level > 0) ? Member::$DEF_LEVEL[$level] :
263
-							'(' . strtolower($member->getStatus()) . ')',
262
+						($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')',
264 263
 						($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
265 264
 							$member->getInvitedBy(), $this->input->getOption('display-name')
266 265
 						) : 'Unknown'
@@ -427,14 +426,14 @@  discard block
 block discarded – undo
427 426
 				$member = $data->gObj('member', Member::class);
428 427
 
429 428
 				if ($lineNumber === 1) {
430
-					$line .= '<info>' . $member->getSingleId() . '</info>';
429
+					$line .= '<info>'.$member->getSingleId().'</info>';
431 430
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
432
-						$line .= '@' . $member->getInstance();
431
+						$line .= '@'.$member->getInstance();
433 432
 					}
434
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
433
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
435 434
 
436
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
437
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
435
+					$line .= ' <info>MemberId</info>: '.$member->getId();
436
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
438 437
 							$member,
439 438
 							$this->input->getOption('display-name')
440 439
 						);
@@ -442,7 +441,7 @@  discard block
 block discarded – undo
442 441
 						$line .= ' <info>Source</info>: '
443 442
 								 . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()];
444 443
 					} else {
445
-						$line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()];
444
+						$line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()];
446 445
 					}
447 446
 				}
448 447
 
@@ -455,15 +454,15 @@  discard block
 block discarded – undo
455 454
 						return $line;
456 455
 					}
457 456
 					$owner = $circle->getOwner();
458
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
457
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
459 458
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
460
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
459
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
461 460
 				}
462 461
 			} else {
463 462
 				if ($lineNumber === 1 && !is_null($circle)) {
464
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
463
+					$line .= '<info>'.$circle->getSingleId().'</info>';
465 464
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
466
-						$line .= '@' . $circle->getInstance();
465
+						$line .= '@'.$circle->getInstance();
467 466
 					}
468 467
 				}
469 468
 			}
Please login to merge, or discard this patch.