@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $remainder = self::remainderCheck(); |
| 178 | 178 | |
| 179 | 179 | if ($early == 0) { |
| 180 | - return ($nextDigit % 2 == 0 && !$remainder) ? 0 : 1; |
|
| 180 | + return ($nextDigit%2 == 0 && !$remainder) ? 0 : 1; |
|
| 181 | 181 | } else { |
| 182 | 182 | return $early == 1 ? 1 : 0; |
| 183 | 183 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $remainder = self::remainderCheck(); |
| 190 | 190 | |
| 191 | 191 | if ($early == 0) { |
| 192 | - return ($nextDigit % 2 == 1 && !$remainder) ? 0 : 1; |
|
| 192 | + return ($nextDigit%2 == 1 && !$remainder) ? 0 : 1; |
|
| 193 | 193 | } else { |
| 194 | 194 | return $early == 1 ? 1 : 0; |
| 195 | 195 | } |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | if ($early == 0 && !$remainder) { |
| 241 | 241 | $val = self::$alt; |
| 242 | - self::$alt = (int)!$val; |
|
| 242 | + self::$alt = (int) !$val; |
|
| 243 | 243 | |
| 244 | 244 | return $val; |
| 245 | 245 | } else { |
@@ -257,9 +257,9 @@ discard block |
||
| 257 | 257 | $rangeMax = 9; |
| 258 | 258 | } else { |
| 259 | 259 | $remainder = substr($remainder, 0, 3); |
| 260 | - $target = (int)($digit.$remainder); |
|
| 260 | + $target = (int) ($digit.$remainder); |
|
| 261 | 261 | $rangeMin = 0; |
| 262 | - $rangeMax = (int)str_repeat('9', strlen($remainder) + 1); |
|
| 262 | + $rangeMax = (int) str_repeat('9', strlen($remainder)+1); |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | $random = RandomProvider::randomInt($rangeMin, $rangeMax, RandomMode::Speed)->asInt(); |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $roundedPartString = $currentPart ? $decimalPart : $wholePart; |
| 294 | 294 | $otherPart = $currentPart ? str_split($wholePart) : str_split($decimalPart); |
| 295 | 295 | $baseLength = $currentPart ? strlen($decimalPart)-1 : strlen($wholePart); |
| 296 | - $pos = $currentPart ? $places : $baseLength + $places; |
|
| 296 | + $pos = $currentPart ? $places : $baseLength+$places; |
|
| 297 | 297 | |
| 298 | 298 | if ($currentPart) { |
| 299 | 299 | $pos = ($absPlaces > $baseLength && $places < 0) ? $baseLength : $pos; |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | bool $currentPart |
| 355 | 355 | ): array |
| 356 | 356 | { |
| 357 | - $digit = (int)$roundedPart[$pos] + $carry; |
|
| 357 | + $digit = (int) $roundedPart[$pos]+$carry; |
|
| 358 | 358 | |
| 359 | 359 | if ($carry == 0 && $digit == 5) { |
| 360 | 360 | static::$remainder = substr($roundedPartString, $pos+1); |
@@ -364,12 +364,12 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | if ($pos == 0) { |
| 366 | 366 | if ($currentPart) { |
| 367 | - $nextDigit = (int)$otherPart[count($otherPart)-1]; |
|
| 367 | + $nextDigit = (int) $otherPart[count($otherPart)-1]; |
|
| 368 | 368 | } else { |
| 369 | 369 | $nextDigit = 0; |
| 370 | 370 | } |
| 371 | 371 | } else { |
| 372 | - $nextDigit = (int)$roundedPart[$pos-1]; |
|
| 372 | + $nextDigit = (int) $roundedPart[$pos-1]; |
|
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | return [$digit, $nextDigit]; |