@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->constraints[] = new Count($min, $max, $weight); |
| 39 | 39 | |
| 40 | - StableSort::usort($this->constraints, function (Count $a, Count $b): int { |
|
| 40 | + StableSort::usort($this->constraints, function(Count $a, Count $b): int { |
|
| 41 | 41 | return $b->getWeight() <=> $a->getWeight(); |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function test($password, ?int $weight = 1): bool |
| 55 | 55 | { |
| 56 | - $count = $this->getCount((string)$password); |
|
| 56 | + $count = $this->getCount((string) $password); |
|
| 57 | 57 | $constraint = $this->getViolation($count, $weight); |
| 58 | 58 | |
| 59 | 59 | return $constraint === null; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function enforce($password): void |
| 69 | 69 | { |
| 70 | - $count = $this->getCount((string)$password); |
|
| 70 | + $count = $this->getCount((string) $password); |
|
| 71 | 71 | $constraint = $this->getViolation($count); |
| 72 | 72 | |
| 73 | 73 | if ($constraint !== null) { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | return true; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - $word = $this->getDictionaryWord((string)$password); |
|
| 110 | + $word = $this->getDictionaryWord((string) $password); |
|
| 111 | 111 | |
| 112 | 112 | return $word === null; |
| 113 | 113 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public function enforce($password): void |
| 119 | 119 | { |
| 120 | - $word = $this->getDictionaryWord((string)$password); |
|
| 120 | + $word = $this->getDictionaryWord((string) $password); |
|
| 121 | 121 | |
| 122 | 122 | if ($word !== null) { |
| 123 | 123 | throw new RuleException($this, $this->getMessage($word)); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $this->constraints[] = new Count($min, $max, $weight); |
| 50 | 50 | |
| 51 | - StableSort::usort($this->constraints, function (Count $a, Count $b): int { |
|
| 51 | + StableSort::usort($this->constraints, function(Count $a, Count $b): int { |
|
| 52 | 52 | return $b->getWeight() <=> $a->getWeight(); |
| 53 | 53 | }); |
| 54 | 54 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function test($password, ?int $weight = 1): bool |
| 74 | 74 | { |
| 75 | - $count = $this->getCount((string)$password); |
|
| 75 | + $count = $this->getCount((string) $password); |
|
| 76 | 76 | $constraint = $this->getViolation($count, $weight); |
| 77 | 77 | |
| 78 | 78 | return $constraint === null; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function enforce($password): void |
| 88 | 88 | { |
| 89 | - $count = $this->getCount((string)$password); |
|
| 89 | + $count = $this->getCount((string) $password); |
|
| 90 | 90 | $constraint = $this->getViolation($count); |
| 91 | 91 | |
| 92 | 92 | if ($constraint !== null) { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->constraints[] = new Count($min, $max, $weight); |
| 39 | 39 | |
| 40 | - StableSort::usort($this->constraints, function (Count $a, Count $b): int { |
|
| 40 | + StableSort::usort($this->constraints, function(Count $a, Count $b): int { |
|
| 41 | 41 | return $b->getWeight() <=> $a->getWeight(); |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function test($password, ?int $weight = 1): bool |
| 55 | 55 | { |
| 56 | - $count = $this->getCount((string)$password); |
|
| 56 | + $count = $this->getCount((string) $password); |
|
| 57 | 57 | $constraint = $this->getViolation($count, $weight); |
| 58 | 58 | |
| 59 | 59 | return $constraint === null; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function enforce($password): void |
| 69 | 69 | { |
| 70 | - $count = $this->getCount((string)$password); |
|
| 70 | + $count = $this->getCount((string) $password); |
|
| 71 | 71 | $constraint = $this->getViolation($count); |
| 72 | 72 | |
| 73 | 73 | if ($constraint !== null) { |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $this->constraints[] = new Count($min, $max, $weight); |
| 54 | 54 | |
| 55 | - StableSort::usort($this->constraints, function (Count $a, Count $b): int { |
|
| 55 | + StableSort::usort($this->constraints, function(Count $a, Count $b): int { |
|
| 56 | 56 | return $b->getWeight() <=> $a->getWeight(); |
| 57 | 57 | }); |
| 58 | 58 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | public function test($password, ?int $weight = 1): bool |
| 107 | 107 | { |
| 108 | - $count = $this->getCount((string)$password); |
|
| 108 | + $count = $this->getCount((string) $password); |
|
| 109 | 109 | $constraint = $this->getViolation($count, $weight); |
| 110 | 110 | |
| 111 | 111 | return $constraint === null; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function enforce($password): void |
| 118 | 118 | { |
| 119 | - $count = $this->getCount((string)$password); |
|
| 119 | + $count = $this->getCount((string) $password); |
|
| 120 | 120 | $constraint = $this->getViolation($count); |
| 121 | 121 | |
| 122 | 122 | if ($constraint !== null) { |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $lines = explode("\r\n", $contents); |
| 167 | 167 | foreach ($lines as $line) { |
| 168 | 168 | if (substr($line, 0, 35) === $suffix) { |
| 169 | - return (int)substr($line, 36); |
|
| 169 | + return (int) substr($line, 36); |
|
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | return 0; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->constraints[] = new Count($min, $max, $weight); |
| 39 | 39 | |
| 40 | - StableSort::usort($this->constraints, function (Count $a, Count $b): int { |
|
| 40 | + StableSort::usort($this->constraints, function(Count $a, Count $b): int { |
|
| 41 | 41 | return $b->getWeight() <=> $a->getWeight(); |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function test($password, ?int $weight = 1): bool |
| 55 | 55 | { |
| 56 | - $count = $this->getCount((string)$password); |
|
| 56 | + $count = $this->getCount((string) $password); |
|
| 57 | 57 | $constraint = $this->getViolation($count, $weight); |
| 58 | 58 | |
| 59 | 59 | return $constraint === null; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function enforce($password): void |
| 69 | 69 | { |
| 70 | - $count = $this->getCount((string)$password); |
|
| 70 | + $count = $this->getCount((string) $password); |
|
| 71 | 71 | $constraint = $this->getViolation($count); |
| 72 | 72 | |
| 73 | 73 | if ($constraint !== null) { |