@@ -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); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | ); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if (! $this->isValidFileInstance($value)) { |
|
| 48 | + if (!$this->isValidFileInstance($value)) { |
|
| 49 | 49 | return false; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ? $value->dimensions() |
| 54 | 54 | : @getimagesize($value->realPath()); |
| 55 | 55 | |
| 56 | - if (! $dimensions) { |
|
| 56 | + if (!$dimensions) { |
|
| 57 | 57 | return false; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $parameters = $this->parseNamedParameters($this->params); |
| 63 | 63 | |
| 64 | - return ! ($this->failsBasicDimensionChecks($parameters, $width, $height) |
|
| 64 | + return !($this->failsBasicDimensionChecks($parameters, $width, $height) |
|
| 65 | 65 | || $this->failsRatioCheck($parameters, $width, $height)); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | protected function failsRatioCheck(array $parameters, int $width, int $height): bool |
| 89 | 89 | { |
| 90 | - if (! isset($parameters['ratio'])) { |
|
| 90 | + if (!isset($parameters['ratio'])) { |
|
| 91 | 91 | return false; |
| 92 | 92 | } |
| 93 | 93 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->requireParameters(['allowed_values']); |
| 37 | 37 | $this->setAllowedValues($this->parameters = $this->parameter('allowed_values')); |
| 38 | 38 | |
| 39 | - if (! $this->isValidFileInstance($value)) { |
|
| 39 | + if (!$this->isValidFileInstance($value)) { |
|
| 40 | 40 | return false; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -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 | |
@@ -62,8 +62,8 @@ |
||
| 62 | 62 | $validator = $this->validation->getValidator(); |
| 63 | 63 | $requiredValidator = $validator('required'); |
| 64 | 64 | |
| 65 | - if (! in_array($anotherValue, $definedValues, is_bool($anotherValue) || null === $anotherValue)) { |
|
| 66 | - return ! $requiredValidator->check($value); |
|
| 65 | + if (!in_array($anotherValue, $definedValues, is_bool($anotherValue) || null === $anotherValue)) { |
|
| 66 | + return !$requiredValidator->check($value); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return true; |
@@ -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 | |