@@ -41,7 +41,7 @@ |
||
| 41 | 41 | // normalize value |
| 42 | 42 | $value = preg_replace('/[^0-9x]/i', '', $value); |
| 43 | 43 | |
| 44 | - if (! $this->hasAllowedLength($value)) { |
|
| 44 | + if (!$this->hasAllowedLength($value)) { |
|
| 45 | 45 | return false; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | |
| 33 | 33 | // each label must be valid |
| 34 | 34 | foreach ($labels as $label) { |
| 35 | - if (! $this->isValidLabel($label)) { |
|
| 35 | + if (!$this->isValidLabel($label)) { |
|
| 36 | 36 | return false; |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // tld must be valid |
| 41 | - return ! (! $this->isValidTld($tld)); |
|
| 41 | + return !(!$this->isValidTld($tld)); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -23,10 +23,10 @@ |
||
| 23 | 23 | $anotherValue = $this->validation->getValue($this->parameter('field')); |
| 24 | 24 | $this->setAllowedValues((array) $anotherValue, 'and'); |
| 25 | 25 | |
| 26 | - if (! is_array($anotherValue)) { |
|
| 26 | + if (!is_array($anotherValue)) { |
|
| 27 | 27 | return true; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - return ! in_array($value, $anotherValue, $this->strict); |
|
| 30 | + return !in_array($value, $anotherValue, $this->strict); |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function check($value): bool |
| 25 | 25 | { |
| 26 | - if (! is_string($value)) { |
|
| 26 | + if (!is_string($value)) { |
|
| 27 | 27 | return false; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | |
| 191 | 191 | public function countries(array|string $countries): self |
| 192 | 192 | { |
| 193 | - $countries = ! is_array($countries) ? func_get_args() : $countries; |
|
| 193 | + $countries = !is_array($countries) ? func_get_args() : $countries; |
|
| 194 | 194 | |
| 195 | 195 | $this->setCountries($countries); |
| 196 | 196 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $imei = $value; |
| 26 | 26 | |
| 27 | - if (strlen($imei) !== 15 || ! ctype_digit($imei)) { |
|
| 27 | + if (strlen($imei) !== 15 || !ctype_digit($imei)) { |
|
| 28 | 28 | return false; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function check($value): bool |
| 35 | 35 | { |
| 36 | - if (! is_array($value)) { |
|
| 36 | + if (!is_array($value)) { |
|
| 37 | 37 | return false; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -30,15 +30,15 @@ |
||
| 30 | 30 | $this->requireParameters($this->fillableParams); |
| 31 | 31 | $time = $this->parameter('date'); |
| 32 | 32 | |
| 33 | - if (! $this->isValidDate($value)) { |
|
| 33 | + if (!$this->isValidDate($value)) { |
|
| 34 | 34 | throw $this->throwException($value); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - if (! $this->isValidDate($time)) { |
|
| 37 | + if (!$this->isValidDate($time)) { |
|
| 38 | 38 | $time = $this->getAttribute()->getValue($time); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if (! $this->isValidDate($time)) { |
|
| 41 | + if (!$this->isValidDate($time)) { |
|
| 42 | 42 | throw $this->throwException($time); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $params = $args; |
| 57 | 57 | |
| 58 | 58 | $validator = static::$validationClass::instance()->getValidator($rule); |
| 59 | - if (! ($validator instanceof Rule)) { |
|
| 59 | + if (!($validator instanceof Rule)) { |
|
| 60 | 60 | throw ValidationException::ruleNotFound($rule); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | private static function ensureValidValidationClass(): void |
| 73 | 73 | { |
| 74 | - if (! is_a(static::$validationClass, Validation::class, true)) { |
|
| 74 | + if (!is_a(static::$validationClass, Validation::class, true)) { |
|
| 75 | 75 | throw new InvalidArgumentException('Static property $validationClass must be a subclass of ' . Validation::class); |
| 76 | 76 | } |
| 77 | 77 | } |