@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | '999999999999' => '9223372036854775808', |
| 135 | 135 | '170141183460469231731687303715884105727' => '170141183460469231731687303715884105728', |
| 136 | 136 | ]; |
| 137 | - $oneOverMax = $maxes[(string)PHP_INT_MAX]; |
|
| 137 | + $oneOverMax = $maxes[(string) PHP_INT_MAX]; |
|
| 138 | 138 | Ints::filter($oneOverMax); |
| 139 | 139 | } |
| 140 | 140 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | '-9223372036854775808' => '-9223372036854775809', |
| 152 | 152 | '-170141183460469231731687303715884105728' => '-170141183460469231731687303715884105729', |
| 153 | 153 | ]; |
| 154 | - $oneUnderMin = $mins[(string)~PHP_INT_MAX]; |
|
| 154 | + $oneUnderMin = $mins[(string) ~PHP_INT_MAX]; |
|
| 155 | 155 | Ints::filter($oneUnderMin); |
| 156 | 156 | } |
| 157 | 157 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | return self::handleStringValues($value); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - throw new FilterException('"' . var_export($value, true) . '" $value is not a string'); |
|
| 74 | + throw new FilterException('"'.var_export($value, true).'" $value is not a string'); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | private static function handleStringValues(string $value) : int |
@@ -111,12 +111,12 @@ discard block |
||
| 111 | 111 | private static function castAndEnforceValidIntegerSize(string $value) : int |
| 112 | 112 | { |
| 113 | 113 | $phpIntMin = ~PHP_INT_MAX; |
| 114 | - $casted = (int)$value; |
|
| 115 | - if ($casted === PHP_INT_MAX && $value !== (string)PHP_INT_MAX) { |
|
| 116 | - throw new FilterException("{$value} was greater than a max int of " . PHP_INT_MAX); |
|
| 114 | + $casted = (int) $value; |
|
| 115 | + if ($casted === PHP_INT_MAX && $value !== (string) PHP_INT_MAX) { |
|
| 116 | + throw new FilterException("{$value} was greater than a max int of ".PHP_INT_MAX); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if ($casted === $phpIntMin && $value !== (string)$phpIntMin) { |
|
| 119 | + if ($casted === $phpIntMin && $value !== (string) $phpIntMin) { |
|
| 120 | 120 | throw new FilterException("{$value} was less than a min int of {$phpIntMin}"); |
| 121 | 121 | } |
| 122 | 122 | |