:octocat: make datamode field static

This commit is contained in:
codemasher
2021-01-23 01:26:11 +01:00
parent 700af4b53e
commit c06e3f1cd6
6 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ final class AlphaNum extends QRDataModeAbstract{
'+' => 40, '-' => 41, '.' => 42, '/' => 43, ':' => 44,
];
protected int $datamode = Mode::DATA_ALPHANUM;
protected static int $datamode = Mode::DATA_ALPHANUM;
/**
* @inheritdoc
@@ -68,8 +68,8 @@ final class AlphaNum extends QRDataModeAbstract{
$len = $this->getCharCount();
$bitBuffer
->put($this->datamode, 4)
->put($len, Mode::getLengthBitsForVersion($this->datamode, $versionNumber))
->put($this::$datamode, 4)
->put($len, Mode::getLengthBitsForVersion($this::$datamode, $versionNumber))
;
// encode 2 characters in 11 bits