mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-18 01:35:45 +00:00
:octocat: shortcut for Mode::getLengthBitsForVersion()
This commit is contained in:
@@ -70,7 +70,7 @@ final class AlphaNum extends QRDataModeAbstract{
|
||||
|
||||
$bitBuffer
|
||||
->put($this::$datamode, 4)
|
||||
->put($len, Mode::getLengthBitsForVersion($this::$datamode, $versionNumber))
|
||||
->put($len, $this::getLengthBits($versionNumber))
|
||||
;
|
||||
|
||||
// encode 2 characters in 11 bits
|
||||
@@ -91,7 +91,7 @@ final class AlphaNum extends QRDataModeAbstract{
|
||||
* @throws \chillerlan\QRCode\Data\QRCodeDataException
|
||||
*/
|
||||
public static function decodeSegment(BitBuffer $bitBuffer, int $versionNumber):string{
|
||||
$length = $bitBuffer->read(Mode::getLengthBitsForVersion(self::$datamode, $versionNumber));
|
||||
$length = $bitBuffer->read(self::getLengthBits($versionNumber));
|
||||
$charmap = array_flip(self::CHAR_TO_ORD);
|
||||
|
||||
// @todo
|
||||
|
||||
Reference in New Issue
Block a user