@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | $this->constraints[] = new CountConstraint($min, $max, $weight); |
40 | 40 | |
41 | - StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int { |
|
41 | + StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int { |
|
42 | 42 | return $b->getWeight() <=> $a->getWeight(); |
43 | 43 | }); |
44 | 44 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function test($password, ?int $weight = 1): bool |
56 | 56 | { |
57 | - $count = $this->getCount((string)$password); |
|
57 | + $count = $this->getCount((string) $password); |
|
58 | 58 | $constraint = $this->getViolation($count, $weight); |
59 | 59 | |
60 | 60 | return $constraint === null; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function validate($password): ?ValidationError |
70 | 70 | { |
71 | - $count = $this->getCount((string)$password); |
|
71 | + $count = $this->getCount((string) $password); |
|
72 | 72 | $constraint = $this->getViolation($count); |
73 | 73 | |
74 | 74 | if ($constraint !== null) { |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $charTrees = []; |
64 | 64 | |
65 | 65 | foreach ($this->codeMap->getMap($charTree) as $char => $codedChars) { |
66 | - $branches = $this->applyInternal($charTree->getBranchesAfterRoot((string)$char)); |
|
66 | + $branches = $this->applyInternal($charTree->getBranchesAfterRoot((string) $char)); |
|
67 | 67 | |
68 | 68 | foreach ($codedChars as $codedChar) { |
69 | 69 | $charTrees[] = CharTree::fromString($codedChar, $branches); |
@@ -106,7 +106,7 @@ |
||
106 | 106 | $guessableData = array_merge($guessableData, $password->getGuessableData()); |
107 | 107 | } |
108 | 108 | |
109 | - foreach ($this->formatter->apply(CharTree::fromString((string)$password)) as $formattedPassword) { |
|
109 | + foreach ($this->formatter->apply(CharTree::fromString((string) $password)) as $formattedPassword) { |
|
110 | 110 | foreach ($guessableData as $data) { |
111 | 111 | if ($this->contains($formattedPassword, $data)) { |
112 | 112 | return $data; |