Completed
Push — master ( 1a6df3...e1f23b )
by Magnar Ovedal
06:43 queued 02:41
created
src/Password.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
     {
81 81
         $this->formerPasswords = array_merge($this->formerPasswords, $formerPasswords);
82 82
 
83
-        StableSort::usort($this->formerPasswords, static function (FormerPassword $a, FormerPassword $b): int {
83
+        StableSort::usort($this->formerPasswords, static function(FormerPassword $a, FormerPassword $b): int {
84 84
             return $b->getDate() <=> $a->getDate();
85 85
         });
86 86
     }
Please login to merge, or discard this patch.
src/Rule/ChangeOnDateRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $this->constraints[] = new DateConstraint($min, $max, $weight);
42 42
 
43
-        StableSort::usort($this->constraints, static function (DateConstraint $a, DateConstraint $b): int {
43
+        StableSort::usort($this->constraints, static function(DateConstraint $a, DateConstraint $b): int {
44 44
             return $b->getWeight() <=> $a->getWeight();
45 45
         });
46 46
 
Please login to merge, or discard this patch.
src/Rule/ChangeWithIntervalRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     {
43 43
         $this->constraints[] = new DateIntervalConstraint($min, $max, $weight);
44 44
 
45
-        StableSort::usort($this->constraints, static function (
45
+        StableSort::usort($this->constraints, static function(
46 46
             DateIntervalConstraint $a,
47 47
             DateIntervalConstraint $b
48 48
         ): int {
Please login to merge, or discard this patch.
src/Rule/NoReuseRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $this->constraints[] = new PositionConstraint($first, $count, $weight);
48 48
 
49
-        StableSort::usort($this->constraints, static function (PositionConstraint $a, PositionConstraint $b): int {
49
+        StableSort::usort($this->constraints, static function(PositionConstraint $a, PositionConstraint $b): int {
50 50
             return $b->getWeight() <=> $a->getWeight();
51 51
         });
52 52
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($password instanceof Password) {
132 132
             $position = 0;
133 133
             foreach ($password->getFormerPasswords() as $formerPassword) {
134
-                if ($this->hashFunction->compare((string)$password, (string)$formerPassword)) {
134
+                if ($this->hashFunction->compare((string) $password, (string) $formerPassword)) {
135 135
                     $positions[] = $position;
136 136
                 }
137 137
                 ++$position;
Please login to merge, or discard this patch.
src/Rule/GuessableDataRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Rule/CharacterClassRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Rule/HaveIBeenPwnedRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Rule/DictionaryRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/Rule/LengthRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.