Passed
Pull Request — master (#1)
by Matthew
02:38
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/WordFormatter/LeetDecoder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $decodeMap = [];
60 60
         foreach ($this->decodeMap as $encodedChar => $chars) {
61
-            if ((string)$encodedChar === mb_substr($word, 0, mb_strlen((string)$encodedChar))) {
61
+            if ((string) $encodedChar === mb_substr($word, 0, mb_strlen((string) $encodedChar))) {
62 62
                 $decodeMap[$encodedChar] = $chars;
63 63
             }
64 64
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         foreach ($this->getDecodeMap($word) as $encodedChar => $chars) {
92
-            foreach ($this->formatWord(mb_substr($word, mb_strlen((string)$encodedChar))) as $suffix) {
92
+            foreach ($this->formatWord(mb_substr($word, mb_strlen((string) $encodedChar))) as $suffix) {
93 93
                 foreach ($chars as $char) {
94 94
                     yield $char.$suffix;
95 95
                 }
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/CharacterClassRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
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
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             return true;
109 109
         }
110 110
 
111
-        $word = $this->getDictionaryWord((string)$password);
111
+        $word = $this->getDictionaryWord((string) $password);
112 112
 
113 113
         return $word === null;
114 114
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function validate($password): ?ValidationError
120 120
     {
121
-        $word = $this->getDictionaryWord((string)$password);
121
+        $word = $this->getDictionaryWord((string) $password);
122 122
 
123 123
         if ($word !== null) {
124 124
             return new ValidationError(
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
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $this->constraints[] = new CountConstraint($min, $max, $weight);
55 55
 
56
-        StableSort::usort($this->constraints, static function (CountConstraint $a, CountConstraint $b): int {
56
+        StableSort::usort($this->constraints, static function(CountConstraint $a, CountConstraint $b): int {
57 57
             return $b->getWeight() <=> $a->getWeight();
58 58
         });
59 59
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function test($password, ?int $weight = 1): bool
108 108
     {
109
-        $count = $this->getCount((string)$password);
109
+        $count = $this->getCount((string) $password);
110 110
         $constraint = $this->getViolation($count, $weight);
111 111
 
112 112
         return $constraint === null;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function validate($password): ?ValidationError
119 119
     {
120
-        $count = $this->getCount((string)$password);
120
+        $count = $this->getCount((string) $password);
121 121
         $constraint = $this->getViolation($count);
122 122
 
123 123
         if ($constraint !== null) {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             $lines = explode("\r\n", $contents);
175 175
             foreach ($lines as $line) {
176 176
                 if (substr($line, 0, 35) === $suffix) {
177
-                    return (int)substr($line, 36);
177
+                    return (int) substr($line, 36);
178 178
                 }
179 179
             }
180 180
             return 0;
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
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Rule/LowerCaseRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.