This commit is contained in:
codemasher
2018-09-19 20:35:16 +02:00
parent 0cfd4fb3a6
commit 2aee933b1e
30 changed files with 134 additions and 169 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ use chillerlan\QRCode\QRCode;
*/
class AlphaNum extends QRDataAbstract{
const CHAR_MAP = [
public const CHAR_MAP = [
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
@@ -41,7 +41,7 @@ class AlphaNum extends QRDataAbstract{
/**
* @inheritdoc
*/
protected function write(string $data){
protected function write(string $data):void{
for($i = 0; $i + 1 < $this->strlen; $i += 2){
$this->bitBuffer->put($this->getCharCode($data[$i]) * 45 + $this->getCharCode($data[$i + 1]), 11);
@@ -59,7 +59,7 @@ class AlphaNum extends QRDataAbstract{
* @return int
* @throws \chillerlan\QRCode\Data\QRCodeDataException
*/
protected function getCharCode(string $chr):int {
protected function getCharCode(string $chr):int{
$i = array_search($chr, $this::CHAR_MAP);
if($i !== false){