Test Failed
Pull Request — 1.x (#56)
by
unknown
11:07
created
src/Rules/ValidHexColor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/', $value)) {
20
+        if ( ! preg_match('/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/', $value)) {
21 21
             $fail('validate.hex-color')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Rules/ValidJwt.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+$/', $value)) {
20
+        if ( ! preg_match('/^[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+$/', $value)) {
21 21
             $fail('validate.jwt')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Rules/ValidIranPostalCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function validate(string $attribute, mixed $value, Closure $fail): void
20 20
     {
21
-        if (! preg_match('/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/', $value)) {
21
+        if ( ! preg_match('/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/', $value)) {
22 22
             $fail('validate.postal-code')->translate();
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
src/Rules/ValidCartNumberIran.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! $this->isCartNumberValid($value)) {
20
+        if ( ! $this->isCartNumberValid($value)) {
21 21
             $fail('validate.cart-number-iran')->translate();
22 22
         }
23 23
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $cardToArr = str_split($value);
34 34
         $cardTotal = 0;
35 35
         for ($i = 0; $i < 16; $i++) {
36
-            $c = (int) $cardToArr[$i];
36
+            $c = (int) $cardToArr[ $i ];
37 37
             if ($i % 2 === 0) {
38 38
                 $cardTotal += (($c * 2 > 9) ? ($c * 2) - 9 : ($c * 2));
39 39
             } else {
Please login to merge, or discard this patch.
src/Rules/ValidStrongPassword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{6,}$/', $value)) {
20
+        if ( ! preg_match('/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{6,}$/', $value)) {
21 21
             $fail('validate.strong-password')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Rules/ValidUuid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/', $value)) {
20
+        if ( ! preg_match('/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/', $value)) {
21 21
             $fail('validate.uuid')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Rules/ValidNameDaysWeek.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^(?:sun(?:day)?|mon(?:day)?|tue(?:sday)?|wed(?:nesday)?|thu(?:rsday)?|fri(?:day)?|sat(?:urday)?)$/i', $value)) {
20
+        if ( ! preg_match('/^(?:sun(?:day)?|mon(?:day)?|tue(?:sday)?|wed(?:nesday)?|thu(?:rsday)?|fri(?:day)?|sat(?:urday)?)$/i', $value)) {
21 21
             $fail('validate.name-days-week')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Rules/ValidPort.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$/', $value)) {
20
+        if ( ! preg_match('/^((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$/', $value)) {
21 21
             $fail('validate.port')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Rules/ValidDiscordUsername.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! preg_match('/^.{3,32}#[0-9]{4}$/', $value)) {
20
+        if ( ! preg_match('/^.{3,32}#[0-9]{4}$/', $value)) {
21 21
             $fail('validate.discord-username')->translate();
22 22
         }
23 23
     }
Please login to merge, or discard this patch.