Passed
Push — master ( 116646...98d703 )
by farhad
02:57 queued 01:11
created
src/ValidationMessages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
 
21 21
     public function __construct()
22 22
     {
23
-        $app_lang = resource_path('lang/validation/'. App::getLocale().'.php');
23
+        $app_lang = resource_path('lang/validation/' . App::getLocale() . '.php');
24 24
 
25
-        if(!file_exists($app_lang)) {
25
+        if (!file_exists($app_lang)) {
26 26
             $this->lang = include $app_lang;
27 27
         } else {
28
-            $this->lang = include __DIR__.'/lang/validation/'.App::getLocale().'.php';
28
+            $this->lang = include __DIR__ . '/lang/validation/' . App::getLocale() . '.php';
29 29
         }
30 30
     }
31 31
 
Please login to merge, or discard this patch.
src/Rules/IsNotPersian.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function rule($attribute, $value, $parameters, $validator): bool
15 15
     {
16 16
         if (is_string($value)) {
17
-            $this->status = (bool)preg_match("/[\x{600}-\x{6FF}]/u", $value);
17
+            $this->status = (bool) preg_match("/[\x{600}-\x{6FF}]/u", $value);
18 18
             return !$this->status;
19 19
         }
20 20
         return false;
Please login to merge, or discard this patch.
src/Rules/CardNumber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,6 +23,6 @@
 block discarded – undo
23 23
             $temp = $temp > 9 ? $temp - 9 : $temp;
24 24
             $sum += $temp;
25 25
         }
26
-        return (bool)($sum % 10 === 0);
26
+        return (bool) ($sum % 10 === 0);
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
src/Rules/IranPhoneWithArea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 
14 14
     public function rule($attribute, $value, $parameters, $validator): bool
15 15
     {
16
-        return (bool)preg_match('/^(0[1-9]{2})[2-9][0-9]{7}+$/', $value);
16
+        return (bool) preg_match('/^(0[1-9]{2})[2-9][0-9]{7}+$/', $value);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Rules/IranPostalCode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 
14 14
     public function rule($attribute, $value, $parameters, $validator): bool
15 15
     {
16
-        return (bool)preg_match("/^(\d{5}-?\d{5})$/", $value);
16
+        return (bool) preg_match("/^(\d{5}-?\d{5})$/", $value);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Rules/IranPhone.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 
14 14
     public function rule($attribute, $value, $parameters, $validator): bool
15 15
     {
16
-        return (bool) preg_match('/^[2-9][0-9]{7}+$/', $value) ;
16
+        return (bool) preg_match('/^[2-9][0-9]{7}+$/', $value);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Rules/IranAddress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 
14 14
     public function rule($attribute, $value, $parameters, $validator): bool
15 15
     {
16
-        return (bool)preg_match("/^[\pL\s\d\-\/\,\،\.\\\\\x{200c}\x{064b}\x{064d}\x{064c}\x{064e}\x{064f}\x{0650}\x{0651}\x{6F0}-\x{6F9}]+$/u", $value);
16
+        return (bool) preg_match("/^[\pL\s\d\-\/\,\،\.\\\\\x{200c}\x{064b}\x{064d}\x{064c}\x{064e}\x{064f}\x{0650}\x{0651}\x{6F0}-\x{6F9}]+$/u", $value);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Rules/IranMobile.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 
15 15
     public function rule($attribute, $value, $parameters, $validator): bool
16 16
     {
17
-        if ((bool) preg_match('/^(((98)|(\+98)|(0098)|0)(9){1}[0-9]{9})+$/', $value) || (bool) preg_match('/^(9){1}[0-9]{9}+$/', $value))
18
-            return true;
17
+        if ((bool) preg_match('/^(((98)|(\+98)|(0098)|0)(9){1}[0-9]{9})+$/', $value) || (bool) preg_match('/^(9){1}[0-9]{9}+$/', $value)) {
18
+                    return true;
19
+        }
19 20
 
20 21
         return false;
21 22
     }
Please login to merge, or discard this patch.
src/Contracts/AbstractValidationRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function register(): void
48 48
     {
49
-        \Validator::extend($this->getValidationRule(), function ($attribute, $value, $parameters, $validator) {
49
+        \Validator::extend($this->getValidationRule(), function($attribute, $value, $parameters, $validator) {
50 50
             return $this->rule($attribute, $value, $parameters, $validator);
51 51
         });
52 52
         \Validator::replacer($this->getValidationRule(), 'ValidationMessages@message');
Please login to merge, or discard this patch.