@@ -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 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return self::handleStringValues($value); |
67 | 67 | } |
68 | 68 | |
69 | - throw new FilterException('"' . var_export($value, true) . '" $value is not a string'); |
|
69 | + throw new FilterException('"'.var_export($value, true).'" $value is not a string'); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | private static function handleStringValues(string $value) : int |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | private static function castAndEnforceValidIntegerSize(string $value) : int |
107 | 107 | { |
108 | 108 | $phpIntMin = ~PHP_INT_MAX; |
109 | - $casted = (int)$value; |
|
109 | + $casted = (int) $value; |
|
110 | 110 | |
111 | 111 | self::enforcePhpIntMax($value, $casted); |
112 | 112 | self::enforcePhpIntMin($value, $casted, $phpIntMin); |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | |
131 | 131 | private static function enforcePhpIntMax(string $value, int $casted) |
132 | 132 | { |
133 | - if ($casted === PHP_INT_MAX && $value !== (string)PHP_INT_MAX) { |
|
134 | - throw new FilterException("{$value} was greater than a max int of " . PHP_INT_MAX); |
|
133 | + if ($casted === PHP_INT_MAX && $value !== (string) PHP_INT_MAX) { |
|
134 | + throw new FilterException("{$value} was greater than a max int of ".PHP_INT_MAX); |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | |
138 | 138 | private static function enforcePhpIntMin(string $value, int $casted, int $phpIntMin) |
139 | 139 | { |
140 | - if ($casted === $phpIntMin && $value !== (string)$phpIntMin) { |
|
140 | + if ($casted === $phpIntMin && $value !== (string) $phpIntMin) { |
|
141 | 141 | throw new FilterException("{$value} was less than a min int of {$phpIntMin}"); |
142 | 142 | } |
143 | 143 | } |