Test Failed
Pull Request — 1.x (#84)
by
unknown
05:27 queued 01:54
created
src/Rules/ValidIranPostalCode.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('/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/', $value)) {
20
+        if ( ! preg_match('/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/', $value)) {
21 21
 
22 22
             $fail('validate.postal-code')->translate();
23 23
         }
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
 
22 22
             $fail('validate.cart-number-iran')->translate();
23 23
         }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $cardToArr = str_split($value);
35 35
         $cardTotal = 0;
36 36
         for ($i = 0; $i < 16; $i++) {
37
-            $c = (int) $cardToArr[$i];
37
+            $c = (int) $cardToArr[ $i ];
38 38
             if ($i % 2 === 0) {
39 39
                 $cardTotal += (($c * 2 > 9) ? ($c * 2) - 9 : ($c * 2));
40 40
             } 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
 
22 22
             $fail('validate.strong-password')->translate();
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
 
22 22
             $fail('validate.uuid')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidCreditCard.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->isCreditCardValid($value)) {
20
+        if ( ! $this->isCreditCardValid($value)) {
21 21
 
22 22
             $fail('validate.credit-card')->translate();
23 23
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $reverse = strrev($value);
39 39
 
40 40
         for ($i = 0; $i < $numLength; $i++) {
41
-            $currentNum = intval($reverse[$i]);
41
+            $currentNum = intval($reverse[ $i ]);
42 42
             if ($i % 2 == 1) {
43 43
                 $currentNum *= 2;
44 44
                 if ($currentNum > 9) {
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
 
22 22
             $fail('validate.name-days-week')->translate();
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
 
22 22
             $fail('validate.port')->translate();
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
 
22 22
             $fail('validate.discord-username')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidPhoneNumber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function __construct(
12 12
         protected ?string $code = null
13
-    ){}
13
+    ) {}
14 14
 
15 15
     /**
16 16
      * Check phone number is valid.
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function validate(string $attribute, mixed $value, Closure $fail): void
24 24
     {
25
-        if (! $this->isPhoneNumberValid($value)) {
25
+        if ( ! $this->isPhoneNumberValid($value)) {
26 26
 
27 27
             $fail('validate.phone-number')->translate();
28 28
         }
Please login to merge, or discard this patch.