@@ -64,7 +64,7 @@ |
||
64 | 64 | { |
65 | 65 | $messages = $validator->errors()->all(); |
66 | 66 | |
67 | - if (! count($messages) || ! is_string($messages[0])) { |
|
67 | + if (!count($messages) || !is_string($messages[0])) { |
|
68 | 68 | return $validator->getValidator()->getTranslation('The given data was invalid.'); |
69 | 69 | } |
70 | 70 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | private function convertStringsToBoolean(array $values): array |
20 | 20 | { |
21 | - return array_map(function ($value) { |
|
21 | + return array_map(function($value) { |
|
22 | 22 | if ($value === 'true') { |
23 | 23 | return true; |
24 | 24 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | private function convertBooleansToString(array $values): array |
34 | 34 | { |
35 | - return array_map(function ($value) { |
|
35 | + return array_map(function($value) { |
|
36 | 36 | if ($value === true) { |
37 | 37 | return 'true'; |
38 | 38 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | private function isIbanValid(string $iban): bool |
45 | 45 | { |
46 | - if (! $this->checkIbanFormat($iban)) { |
|
46 | + if (!$this->checkIbanFormat($iban)) { |
|
47 | 47 | return false; |
48 | 48 | } |
49 | 49 | |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | |
68 | 68 | $ibanCountryCode = $this->getIbanCountryCode($iban); |
69 | 69 | |
70 | - return ! (empty($this->checkIfBcmodIsAvailable()) |
|
71 | - || ! $this->twoFirstCharactersValid($ibanCountryCode) |
|
72 | - || ! $this->isCountriesValid($ibanCountryCode) |
|
73 | - || ! $this->isIbanLengthValid($iban, $ibanCountryCode)); |
|
70 | + return !(empty($this->checkIfBcmodIsAvailable()) |
|
71 | + || !$this->twoFirstCharactersValid($ibanCountryCode) |
|
72 | + || !$this->isCountriesValid($ibanCountryCode) |
|
73 | + || !$this->isIbanLengthValid($iban, $ibanCountryCode)); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | private function twoFirstCharactersValid(string $countryCode): bool |
96 | 96 | { |
97 | - return ! empty($countryCode) && ctype_alpha($countryCode); |
|
97 | + return !empty($countryCode) && ctype_alpha($countryCode); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | private function isCountryValid(string $country, string $ibanCountryCode): bool |
122 | 122 | { |
123 | - return ! empty($country) |
|
123 | + return !empty($country) |
|
124 | 124 | && isset($this->ibanLengthByCountry[$country]) |
125 | 125 | && $ibanCountryCode === $country; |
126 | 126 | } |
@@ -29,15 +29,15 @@ |
||
29 | 29 | $value = (string) $value; |
30 | 30 | } |
31 | 31 | |
32 | - if (! is_string($value)) { |
|
32 | + if (!is_string($value)) { |
|
33 | 33 | return false; |
34 | 34 | } |
35 | 35 | |
36 | - if (! is_numeric($compare = $this->parameter('value'))) { |
|
36 | + if (!is_numeric($compare = $this->parameter('value'))) { |
|
37 | 37 | $compare = $this->getAttribute()->getValue($compare); |
38 | 38 | } |
39 | 39 | |
40 | - if (! is_numeric($value) || ! is_numeric($compare) || ((int) $compare === 0 && (int) $value === 0)) { |
|
40 | + if (!is_numeric($value) || !is_numeric($compare) || ((int) $compare === 0 && (int) $value === 0)) { |
|
41 | 41 | return false; |
42 | 42 | } |
43 | 43 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $max = $this->getBytesSize($this->parameter('max')); |
33 | 33 | $valueSize = $this->getValueSize($value); |
34 | 34 | |
35 | - if (! is_numeric($valueSize)) { |
|
35 | + if (!is_numeric($valueSize)) { |
|
36 | 36 | return false; |
37 | 37 | } |
38 | 38 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $anotherValue = $this->validation->getValue($this->parameter('field')); |
44 | 44 | $this->setAllowedValues((array) $anotherValue, 'or'); |
45 | 45 | |
46 | - if (! is_array($anotherValue)) { |
|
46 | + if (!is_array($anotherValue)) { |
|
47 | 47 | return false; |
48 | 48 | } |
49 | 49 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return static::default(); |
75 | 75 | } |
76 | 76 | |
77 | - if (! is_callable($callback) && ! $callback instanceof static) { |
|
77 | + if (!is_callable($callback) && !$callback instanceof static) { |
|
78 | 78 | throw new InvalidArgumentException('The given callback should be callable or an instance of ' . static::class); |
79 | 79 | } |
80 | 80 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | protected function toKilobytes(int|string $size) |
174 | 174 | { |
175 | - if (! is_string($size)) { |
|
175 | + if (!is_string($size)) { |
|
176 | 176 | return $size; |
177 | 177 | } |
178 | 178 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | $rules = array_merge($rules, $this->buildMimetypes()); |
239 | 239 | |
240 | - if (! empty($this->allowedExtensions)) { |
|
240 | + if (!empty($this->allowedExtensions)) { |
|
241 | 241 | $rules[] = 'ext:' . implode(',', array_map('strtolower', $this->allowedExtensions)); |
242 | 242 | } |
243 | 243 |
@@ -35,15 +35,15 @@ |
||
35 | 35 | $this->requireParameters($this->fillableParams); |
36 | 36 | $time = $this->parameter('time'); |
37 | 37 | |
38 | - if (! $this->isValidDate($value)) { |
|
38 | + if (!$this->isValidDate($value)) { |
|
39 | 39 | throw $this->throwException($value); |
40 | 40 | } |
41 | 41 | |
42 | - if (! $this->isValidDate($time)) { |
|
42 | + if (!$this->isValidDate($time)) { |
|
43 | 43 | $time = $this->getAttribute()->getValue($time); |
44 | 44 | } |
45 | 45 | |
46 | - if (! $this->isValidDate($time)) { |
|
46 | + if (!$this->isValidDate($time)) { |
|
47 | 47 | throw $this->throwException($time); |
48 | 48 | } |
49 | 49 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | $algo = strtoupper($this->parameter('algo')); |
43 | 43 | |
44 | - if (! isset($this->algorithmsLengths[$algo])) { |
|
44 | + if (!isset($this->algorithmsLengths[$algo])) { |
|
45 | 45 | $algos = array_keys($this->algorithmsLengths); |
46 | 46 | |
47 | 47 | throw new InvalidArgumentException('algo parameter must be one of ' . implode('/', $algos)); |