@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | $this->constraints[] = new CountConstraint($min, $max, $weight); |
| 53 | 53 | |
| 54 | - StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int { |
|
| 54 | + StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int { |
|
| 55 | 55 | return $b->getWeight() <=> $a->getWeight(); |
| 56 | 56 | }); |
| 57 | 57 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function test($password, ?int $weight = 1): bool |
| 77 | 77 | { |
| 78 | - $count = $this->getCount((string)$password); |
|
| 78 | + $count = $this->getCount((string) $password); |
|
| 79 | 79 | $constraint = $this->getViolation($count, $weight); |
| 80 | 80 | |
| 81 | 81 | return $constraint === null; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function validate($password, TranslatorInterface $translator): ?ValidationError |
| 92 | 92 | { |
| 93 | - $count = $this->getCount((string)$password); |
|
| 93 | + $count = $this->getCount((string) $password); |
|
| 94 | 94 | $constraint = $this->getViolation($count); |
| 95 | 95 | |
| 96 | 96 | if ($constraint !== null) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $this->constraints[] = new CountConstraint($min, $max, $weight); |
| 41 | 41 | |
| 42 | - StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int { |
|
| 42 | + StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int { |
|
| 43 | 43 | return $b->getWeight() <=> $a->getWeight(); |
| 44 | 44 | }); |
| 45 | 45 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function test($password, ?int $weight = 1): bool |
| 57 | 57 | { |
| 58 | - $count = $this->getCount((string)$password); |
|
| 58 | + $count = $this->getCount((string) $password); |
|
| 59 | 59 | $constraint = $this->getViolation($count, $weight); |
| 60 | 60 | |
| 61 | 61 | return $constraint === null; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function validate($password, TranslatorInterface $translator): ?ValidationError |
| 72 | 72 | { |
| 73 | - $count = $this->getCount((string)$password); |
|
| 73 | + $count = $this->getCount((string) $password); |
|
| 74 | 74 | $constraint = $this->getViolation($count); |
| 75 | 75 | |
| 76 | 76 | if ($constraint !== null) { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | $this->constraints[] = new CountConstraint($min, $max, $weight); |
| 56 | 56 | |
| 57 | - StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int { |
|
| 57 | + StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int { |
|
| 58 | 58 | return $b->getWeight() <=> $a->getWeight(); |
| 59 | 59 | }); |
| 60 | 60 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function test($password, ?int $weight = 1): bool |
| 109 | 109 | { |
| 110 | - $count = $this->getCount((string)$password); |
|
| 110 | + $count = $this->getCount((string) $password); |
|
| 111 | 111 | $constraint = $this->getViolation($count, $weight); |
| 112 | 112 | |
| 113 | 113 | return $constraint === null; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | public function validate($password, TranslatorInterface $translator): ?ValidationError |
| 120 | 120 | { |
| 121 | - $count = $this->getCount((string)$password); |
|
| 121 | + $count = $this->getCount((string) $password); |
|
| 122 | 122 | $constraint = $this->getViolation($count); |
| 123 | 123 | |
| 124 | 124 | if ($constraint !== null) { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $lines = explode("\r\n", $contents); |
| 176 | 176 | foreach ($lines as $line) { |
| 177 | 177 | if (substr($line, 0, 35) === $suffix) { |
| 178 | - return (int)substr($line, 36); |
|
| 178 | + return (int) substr($line, 36); |
|
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | 181 | return 0; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $this->constraints[] = new CountConstraint($min, $max, $weight); |
| 41 | 41 | |
| 42 | - StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int { |
|
| 42 | + StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int { |
|
| 43 | 43 | return $b->getWeight() <=> $a->getWeight(); |
| 44 | 44 | }); |
| 45 | 45 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function test($password, ?int $weight = 1): bool |
| 57 | 57 | { |
| 58 | - $count = $this->getCount((string)$password); |
|
| 58 | + $count = $this->getCount((string) $password); |
|
| 59 | 59 | $constraint = $this->getViolation($count, $weight); |
| 60 | 60 | |
| 61 | 61 | return $constraint === null; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function validate($password, TranslatorInterface $translator): ?ValidationError |
| 72 | 72 | { |
| 73 | - $count = $this->getCount((string)$password); |
|
| 73 | + $count = $this->getCount((string) $password); |
|
| 74 | 74 | $constraint = $this->getViolation($count); |
| 75 | 75 | |
| 76 | 76 | if ($constraint !== null) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $this->constraints[] = new CountConstraint($min, $max, $weight); |
| 41 | 41 | |
| 42 | - StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int { |
|
| 42 | + StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int { |
|
| 43 | 43 | return $b->getWeight() <=> $a->getWeight(); |
| 44 | 44 | }); |
| 45 | 45 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function test($password, ?int $weight = 1): bool |
| 57 | 57 | { |
| 58 | - $count = $this->getCount((string)$password); |
|
| 58 | + $count = $this->getCount((string) $password); |
|
| 59 | 59 | $constraint = $this->getViolation($count, $weight); |
| 60 | 60 | |
| 61 | 61 | return $constraint === null; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function validate($password, TranslatorInterface $translator): ?ValidationError |
| 72 | 72 | { |
| 73 | - $count = $this->getCount((string)$password); |
|
| 73 | + $count = $this->getCount((string) $password); |
|
| 74 | 74 | $constraint = $this->getViolation($count); |
| 75 | 75 | |
| 76 | 76 | if ($constraint !== null) { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | return true; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - $word = $this->getDictionaryWord((string)$password); |
|
| 63 | + $word = $this->getDictionaryWord((string) $password); |
|
| 64 | 64 | |
| 65 | 65 | return $word === null; |
| 66 | 66 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function validate($password, TranslatorInterface $translator): ?ValidationError |
| 72 | 72 | { |
| 73 | - $word = $this->getDictionaryWord((string)$password); |
|
| 73 | + $word = $this->getDictionaryWord((string) $password); |
|
| 74 | 74 | |
| 75 | 75 | if ($word !== null) { |
| 76 | 76 | return new ValidationError( |