Test Failed
Pull Request — 1.x (#84)
by
unknown
03:53
created
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.
src/Rules/ValidEvenNumber.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*[02468]$/', $value)) {
20
+        if ( ! preg_match('/^\d*[02468]$/', $value)) {
21 21
 
22 22
             $fail('validate.even-number')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidNationalCard.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->isNationalCardValid($value)) {
20
+        if ( ! $this->isNationalCardValid($value)) {
21 21
 
22 22
             $fail('validate.national-card')->translate();
23 23
         }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     private function isNationalCardValid(mixed $value): bool
33 33
     {
34
-        if (! preg_match('/^\d{10}$/', $value)) {
34
+        if ( ! preg_match('/^\d{10}$/', $value)) {
35 35
             return false;
36 36
         }
37 37
 
Please login to merge, or discard this patch.