@@ -18,6 +18,6 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function check($value): bool |
| 20 | 20 | { |
| 21 | - return ! parent::check($value); |
|
| 21 | + return !parent::check($value); |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -44,6 +44,6 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // and it should be between 0 and 32 inclusive |
| 47 | - return ! ($parts[1] < 0 || $parts[1] > 32); |
|
| 47 | + return !($parts[1] < 0 || $parts[1] > 32); |
|
| 48 | 48 | } |
| 49 | 49 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public function check($value): bool |
| 167 | 167 | { |
| 168 | - if (! is_string($value)) { |
|
| 168 | + if (!is_string($value)) { |
|
| 169 | 169 | return false; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -181,16 +181,16 @@ discard block |
||
| 181 | 181 | $this->validation->getMessages(), |
| 182 | 182 | ); |
| 183 | 183 | |
| 184 | - if ($this->mixedCase && ! preg_match('/(\p{Ll}+.*\p{Lu})|(\p{Lu}+.*\p{Ll})/u', $value)) { |
|
| 184 | + if ($this->mixedCase && !preg_match('/(\p{Ll}+.*\p{Lu})|(\p{Lu}+.*\p{Ll})/u', $value)) { |
|
| 185 | 185 | $this->validation->errors()->add($attribute, static::name() . '.mixed', $this->processTranslate('password.mixed')); |
| 186 | 186 | } |
| 187 | - if ($this->letters && ! preg_match('/\pL/u', $value)) { |
|
| 187 | + if ($this->letters && !preg_match('/\pL/u', $value)) { |
|
| 188 | 188 | $this->validation->errors()->add($attribute, static::name() . '.letters', $this->processTranslate('password.letters')); |
| 189 | 189 | } |
| 190 | - if ($this->symbols && ! preg_match('/\p{Z}|\p{S}|\p{P}/u', $value)) { |
|
| 190 | + if ($this->symbols && !preg_match('/\p{Z}|\p{S}|\p{P}/u', $value)) { |
|
| 191 | 191 | $this->validation->errors()->add($attribute, static::name() . '.symbols', $this->processTranslate('password.symbols')); |
| 192 | 192 | } |
| 193 | - if ($this->numbers && ! preg_match('/\pN/u', $value)) { |
|
| 193 | + if ($this->numbers && !preg_match('/\pN/u', $value)) { |
|
| 194 | 194 | $this->validation->errors()->add($attribute, static::name() . '.numbers', $this->processTranslate('password.numbers')); |
| 195 | 195 | } |
| 196 | 196 | |
@@ -23,12 +23,12 @@ |
||
| 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 | |
| 30 | 30 | foreach ($this->getWords($value) as $word) { |
| 31 | - if (! $this->isValidWord($word)) { |
|
| 31 | + if (!$this->isValidWord($word)) { |
|
| 32 | 32 | return false; |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -18,6 +18,6 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function check($value): bool |
| 20 | 20 | { |
| 21 | - return ! $this->validation->hasValue($this->attribute->getKey()); |
|
| 21 | + return !$this->validation->hasValue($this->attribute->getKey()); |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -42,11 +42,11 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function check($value): bool |
| 44 | 44 | { |
| 45 | - if (! is_numeric($value)) { |
|
| 45 | + if (!is_numeric($value)) { |
|
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if (! $this->hasAllowedLength($value)) { |
|
| 49 | + if (!$this->hasAllowedLength($value)) { |
|
| 50 | 50 | return false; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function check($value): bool |
| 45 | 45 | { |
| 46 | - if (! is_array($value)) { |
|
| 46 | + if (!is_array($value)) { |
|
| 47 | 47 | if (null === $attribute = $this->attribute->getPrimaryAttribute()) { |
| 48 | 48 | return false; |
| 49 | 49 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | if (in_array('ignore_case', $this->parameters, true)) { |
| 58 | - $value = array_map(function ($v) { |
|
| 58 | + $value = array_map(function($v) { |
|
| 59 | 59 | if (is_string($v)) { |
| 60 | 60 | $v = strtolower($v); |
| 61 | 61 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function check($value): bool |
| 22 | 22 | { |
| 23 | 23 | // https://www.php.net/manual/en/function.is-float.php#117304 |
| 24 | - if (! is_scalar($value)) { |
|
| 24 | + if (!is_scalar($value)) { |
|
| 25 | 25 | return false; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -34,11 +34,11 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function check($value): bool |
| 36 | 36 | { |
| 37 | - if ((! is_string($value) && ! is_numeric($value) && ! ($value instanceof DateTimeInterface))) { |
|
| 37 | + if ((!is_string($value) && !is_numeric($value) && !($value instanceof DateTimeInterface))) { |
|
| 38 | 38 | return false; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if (! empty($format = $this->parameter('format'))) { |
|
| 41 | + if (!empty($format = $this->parameter('format'))) { |
|
| 42 | 42 | $this->message .= ' format'; |
| 43 | 43 | |
| 44 | 44 | $date = DateTime::createFromFormat($format, $value); |