Passed
Pull Request — master (#3)
by S.Hossein
08:26
created
src/Pregex.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function IsPersianNumber(string $number): bool
49 49
     {
50
-        return (bool)preg_match("/(^[" . self::$persian_number . "]+$)/u", $number);
50
+        return (bool) preg_match("/(^[" . self::$persian_number . "]+$)/u", $number);
51 51
     }
52 52
 
53 53
     public function IsArabicNumber(string $number): bool
54 54
     {
55
-        return (bool)preg_match("/(^[" . self::$arabic_numbers . "]+$)/u", $number);
55
+        return (bool) preg_match("/(^[" . self::$arabic_numbers . "]+$)/u", $number);
56 56
     }
57 57
 
58 58
     public function IsPersianOrArabicNumber(string $number): bool
59 59
     {
60
-        return (bool)preg_match("/(^[" .
60
+        return (bool) preg_match("/(^[" .
61 61
             self::$arabic_numbers .
62 62
             self::$persian_number .
63 63
             "]+$)/u", $number);
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function IsEmail(string $email): bool
67 67
     {
68
-        return (bool)filter_var($email, FILTER_VALIDATE_EMAIL);
68
+        return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
69 69
     }
70 70
 
71 71
     public function IsCellphone(string $number): bool
72 72
     {
73
-        return (bool)preg_match('/^(^((98)|(\+98)|0)?(9){1}[0-9]{9})+$/', $number);
73
+        return (bool) preg_match('/^(^((98)|(\+98)|0)?(9){1}[0-9]{9})+$/', $number);
74 74
     }
75 75
 
76 76
     public function IsIban(string $value): bool
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
 
153 153
     public function IsPostalCode(string $value): bool
154 154
     {
155
-        return (bool)preg_match("/^(\d{5}-?\d{5})$/", $value);
155
+        return (bool) preg_match("/^(\d{5}-?\d{5})$/", $value);
156 156
     }
157 157
 
158 158
     public function IsPersianText(string $value): bool
159 159
     {
160
-        return (bool)preg_match("/^[\x{600}-\x{6FF}\x{200c}\x{064b}\x{064d}\x{064c}\x{064e}\x{064f}\x{0650}\x{0651}\x{002E}\s]+$/u", $value);
160
+        return (bool) preg_match("/^[\x{600}-\x{6FF}\x{200c}\x{064b}\x{064d}\x{064c}\x{064e}\x{064f}\x{0650}\x{0651}\x{002E}\s]+$/u", $value);
161 161
     }
162 162
 
163 163
     public function IsPersianName(string $name): bool
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     public function IsPersianAlphabet(string $chars): bool
169 169
     {
170
-        return (bool)preg_match("/^[\u0600-\u06FF\s]+$/u", $chars);
170
+        return (bool) preg_match("/^[\u0600-\u06FF\s]+$/u", $chars);
171 171
     }
172 172
 
173 173
     public function IsWithoutPersianAlphabet(string $value): bool
@@ -177,6 +177,6 @@  discard block
 block discarded – undo
177 177
 
178 178
     public function IsWithoutNumber(string $value): bool
179 179
     {
180
-        return (bool)preg_match("/[" . self::$persian_number . self::$arabic_numbers . "]$/u", $value);
180
+        return (bool) preg_match("/[" . self::$persian_number . self::$arabic_numbers . "]$/u", $value);
181 181
     }
182 182
 }
Please login to merge, or discard this patch.