Passed
Push — master ( 71a920...7ee81a )
by Magnar Ovedal
02:31
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, function (FormerPassword $a, FormerPassword $b): int {
83
+        StableSort::usort($this->formerPasswords, 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/GuessableData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
     private function getGuessableData($password)
105 105
     {
106 106
         if ($password instanceof Password) {
107
-            foreach ($this->getWordsToCheck((string)$password) as $word) {
107
+            foreach ($this->getWordsToCheck((string) $password) as $word) {
108 108
                 foreach ($password->getGuessableData() as $data) {
109 109
                     if ($this->contains($word, $data)) {
110 110
                         return $data;
Please login to merge, or discard this patch.
src/WordConverter/Leetspeak.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $decodeMap = [];
59 59
         foreach ($this->decodeMap as $encodedChar => $chars) {
60
-            if ((string)$encodedChar === mb_substr($word, 0, mb_strlen((string)$encodedChar))) {
60
+            if ((string) $encodedChar === mb_substr($word, 0, mb_strlen((string) $encodedChar))) {
61 61
                 $decodeMap[$encodedChar] = $chars;
62 62
             }
63 63
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         foreach ($this->getDecodeMap($word) as $encodedChar => $chars) {
80
-            foreach ($this->convert(mb_substr($word, mb_strlen((string)$encodedChar))) as $suffix) {
80
+            foreach ($this->convert(mb_substr($word, mb_strlen((string) $encodedChar))) as $suffix) {
81 81
                 foreach ($chars as $char) {
82 82
                     yield $char.$suffix;
83 83
                 }
Please login to merge, or discard this patch.
src/Rule/NoReuse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $this->constraints[] = new Position($first, $count, $weight);
52 52
 
53
-        StableSort::usort($this->constraints, function (Position $a, Position $b): int {
53
+        StableSort::usort($this->constraints, function(Position $a, Position $b): int {
54 54
             return $b->getWeight() <=> $a->getWeight();
55 55
         });
56 56
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if ($password instanceof Password) {
124 124
             $position = 0;
125 125
             foreach ($password->getFormerPasswords() as $formerPassword) {
126
-                if ($this->hashFunction->compare((string)$password, (string)$formerPassword)) {
126
+                if ($this->hashFunction->compare((string) $password, (string) $formerPassword)) {
127 127
                     $positions[] = $position;
128 128
                 }
129 129
                 ++$position;
Please login to merge, or discard this patch.
src/Rule/LowerCase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
67 67
      */
68 68
     public function validate($password): ?ValidationError
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) {
Please login to merge, or discard this patch.
src/Rule/HaveIBeenPwned.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
116 116
      */
117 117
     public function validate($password): ?ValidationError
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) {
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
             $lines = explode("\r\n", $contents);
169 169
             foreach ($lines as $line) {
170 170
                 if (substr($line, 0, 35) === $suffix) {
171
-                    return (int)substr($line, 36);
171
+                    return (int) substr($line, 36);
172 172
                 }
173 173
             }
174 174
             return 0;
Please login to merge, or discard this patch.
src/Rule/Dictionary.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/Length.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
67 67
      */
68 68
     public function validate($password): ?ValidationError
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) {
Please login to merge, or discard this patch.
src/Rule/CharacterClass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
67 67
      */
68 68
     public function validate($password): ?ValidationError
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) {
Please login to merge, or discard this patch.