@@ -55,17 +55,17 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function IsPersianNumber(string $number): bool |
| 57 | 57 | { |
| 58 | - return (bool)preg_match("/(^[" . self::$persian_numbers . "]+$)/u", $number); |
|
| 58 | + return (bool) preg_match("/(^[" . self::$persian_numbers . "]+$)/u", $number); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function IsArabicNumber(string $number): bool |
| 62 | 62 | { |
| 63 | - return (bool)preg_match("/(^[" . self::$arabic_numbers . "]+$)/u", $number); |
|
| 63 | + return (bool) preg_match("/(^[" . self::$arabic_numbers . "]+$)/u", $number); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function IsPersianOrArabicNumber(string $number): bool |
| 67 | 67 | { |
| 68 | - return (bool)preg_match("/(^[" . |
|
| 68 | + return (bool) preg_match("/(^[" . |
|
| 69 | 69 | self::$arabic_numbers . |
| 70 | 70 | self::$persian_numbers . |
| 71 | 71 | "]+$)/u", $number); |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | public function IsEmail(string $email): bool |
| 75 | 75 | { |
| 76 | - return (bool)filter_var($email, FILTER_VALIDATE_EMAIL); |
|
| 76 | + return (bool) filter_var($email, FILTER_VALIDATE_EMAIL); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function IsCellphone(string $number): bool |
| 80 | 80 | { |
| 81 | - return (bool)preg_match('/^(^((98)|(\+98)|0)?(9){1}[0-9]{9})+$/', $number); |
|
| 81 | + return (bool) preg_match('/^(^((98)|(\+98)|0)?(9){1}[0-9]{9})+$/', $number); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | public function IsIban(string $value): bool |
@@ -160,12 +160,12 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | public function IsPostalCode(string $value): bool |
| 162 | 162 | { |
| 163 | - return (bool)preg_match("/^(\d{5}-?\d{5})$/", $value); |
|
| 163 | + return (bool) preg_match("/^(\d{5}-?\d{5})$/", $value); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | public function IsPersianText(string $value): bool |
| 167 | 167 | { |
| 168 | - return (bool)preg_match("/^[" . |
|
| 168 | + return (bool) preg_match("/^[" . |
|
| 169 | 169 | self::$persian_text |
| 170 | 170 | . "\x{200c}\x{064b}\x{064d}\x{064c}\x{064e}\x{064f}\x{0650}\x{0651}\x{002E}" . |
| 171 | 171 | "\s]+$/u", $value); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | public function IsPersianAlphabet(string $chars): bool |
| 175 | 175 | { |
| 176 | - return (bool)preg_match("/(^[" . |
|
| 176 | + return (bool) preg_match("/(^[" . |
|
| 177 | 177 | self::$arabic_common_chars . |
| 178 | 178 | self::$persian_alphabets . |
| 179 | 179 | self::$spaces . |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | public function IsWithoutPersianAlphabet(string $value): bool |
| 193 | 193 | { |
| 194 | - $hasPersianChar = (bool)preg_match("/[" . |
|
| 194 | + $hasPersianChar = (bool) preg_match("/[" . |
|
| 195 | 195 | self::$persian_text . |
| 196 | 196 | "]/u", $value); |
| 197 | 197 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | public function IsWithoutNumber(string $value): bool |
| 202 | 202 | { |
| 203 | - $hasPersianNumber = (bool)preg_match("/([" . |
|
| 203 | + $hasPersianNumber = (bool) preg_match("/([" . |
|
| 204 | 204 | self::$persian_numbers . |
| 205 | 205 | self::$arabic_numbers . |
| 206 | 206 | "]+)/u", $value); |