mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-27 22:26:38 +00:00
💄
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user