Skip to content

Commit 62e81b9

Browse files
committed
fix: code review
fix #5459 (comment) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 548a39a commit 62e81b9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/Service/IdentifyMethod/SignatureMethod/TwofactorGatewayToken.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
use OCA\Libresign\Service\IdentifyMethod\IdentifyService;
1212

1313
class TwofactorGatewayToken extends AbstractSignatureMethod implements IToken {
14+
private const VISIBILITY_START = 2;
15+
private const VISIBILITY_END = 2;
16+
1417
public function __construct(
1518
protected IdentifyService $identifyService,
1619
protected TokenService $tokenService,
@@ -52,7 +55,11 @@ public function toArray(): array {
5255
return $return;
5356
}
5457

55-
private function blurIdentifier(string $identifier, int $visibleStart = 2, int $visibleEnd = 2): string {
58+
private function blurIdentifier(
59+
string $identifier,
60+
int $visibleStart = self::VISIBILITY_START,
61+
int $visibleEnd = self::VISIBILITY_END,
62+
): string {
5663
$length = mb_strlen($identifier);
5764

5865
if ($length <= $visibleStart + $visibleEnd) {

0 commit comments

Comments
 (0)