Test Failed
Pull Request — 1.x (#84)
by
unknown
03:53
created
src/Rules/ValidUrl.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('/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/', $value)) {
20
+        if ( ! preg_match('/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/', $value)) {
21 21
 
22 22
             $fail('validate.url')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidIban.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     private array $countries;
168 168
 
169
-    public function __construct(array|string $countries = [])
169
+    public function __construct(array | string $countries = [ ])
170 170
     {
171 171
         $this->setCountries(func_get_args());
172 172
     }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function validate(string $attribute, mixed $value, Closure $fail): void
183 183
     {
184
-        if (! $this->isIbanValid($value)) {
184
+        if ( ! $this->isIbanValid($value)) {
185 185
 
186 186
             $fail('validate.iban')->translate();
187 187
         }
Please login to merge, or discard this patch.
src/Rules/ValidImei.php 1 patch
Spacing   +3 added lines, -3 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->isImeiValid($value)) {
20
+        if ( ! $this->isImeiValid($value)) {
21 21
 
22 22
             $fail('validate.imei')->translate();
23 23
         }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $digits = str_split($imei); // Get digits
41 41
         $imei_last = array_pop($digits); // Remove last digit, and store it
42
-        $log = [];
42
+        $log = [ ];
43 43
 
44 44
         foreach ($digits as $key => $n) {
45 45
             if ($key & 1) {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 $n = array_sum($double); // Sum double digits
48 48
             }
49 49
 
50
-            $log[] = $n; // Append log
50
+            $log[ ] = $n; // Append log
51 51
         }
52 52
         $sum = array_sum($log) * 9; // Sum log & multiply by 9
53 53
 
Please login to merge, or discard this patch.
src/Rules/ValidCarNumber.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]{2}[0-9]{2}[A-Z]{2}[0-9]{4}$/', $value)) {
20
+        if ( ! preg_match('/^[A-Z]{2}[0-9]{2}[A-Z]{2}[0-9]{4}$/', $value)) {
21 21
 
22 22
             $fail('validate.car-number')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidSlashEndOfString.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('/\/+$/', $value)) {
20
+        if ( ! preg_match('/\/+$/', $value)) {
21 21
 
22 22
             $fail('validate.slash-end-of-string')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidKebabCase.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('/^(?:\p{Ll}+\-)*\p{Ll}+$/u', $value)) {
20
+        if ( ! preg_match('/^(?:\p{Ll}+\-)*\p{Ll}+$/u', $value)) {
21 21
 
22 22
             $fail('validate.kebab-case')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidUlid.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-7][0-9A-HJKMNP-TV-Z]{25}/', $value)) {
20
+        if ( ! preg_match('/[0-7][0-9A-HJKMNP-TV-Z]{25}/', $value)) {
21 21
 
22 22
             $fail('validate.ulid')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidBitcoinAddress.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('/^(?:bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$/', $value)) {
20
+        if ( ! preg_match('/^(?:bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$/', $value)) {
21 21
 
22 22
             $fail('validate.bitcoin-address')->translate();
23 23
         }
Please login to merge, or discard this patch.
src/Rules/ValidUsername.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-z0-9_-]{3,15}$/', $value)) {
20
+        if ( ! preg_match('/^[a-z0-9_-]{3,15}$/', $value)) {
21 21
 
22 22
             $fail('validate.username')->translate();
23 23
         }
Please login to merge, or discard this patch.