🚿 clean up some (int) casts

This commit is contained in:
smiley
2023-07-12 21:23:43 +02:00
parent edbc995b63
commit 5a280c8107
13 changed files with 89 additions and 81 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ namespace chillerlan\QRCode\Data;
use chillerlan\QRCode\Common\{BitBuffer, Mode};
use function array_flip, ceil, str_split;
use function array_flip, ceil, intdiv, str_split;
/**
* Alphanumeric mode: 0 to 9, A to Z, space, $ % * + - . / :
@@ -118,7 +118,7 @@ final class AlphaNum extends QRDataModeAbstract{
}
$nextTwoCharsBits = $bitBuffer->read(11);
$result .= $toAlphaNumericChar((int)($nextTwoCharsBits / 45));
$result .= $toAlphaNumericChar(intdiv($nextTwoCharsBits, 45));
$result .= $toAlphaNumericChar($nextTwoCharsBits % 45);
$length -= 2;
}