mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-12 02:36:28 +00:00
🚿
This commit is contained in:
@@ -14,6 +14,8 @@ namespace chillerlan\QRCode\Common;
|
||||
|
||||
use chillerlan\QRCode\QRCodeException;
|
||||
|
||||
use function array_column, array_combine, array_keys;
|
||||
|
||||
/**
|
||||
*/
|
||||
class EccLevel{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Class Version
|
||||
*
|
||||
* @filesource Version.php
|
||||
* @created 19.11.2020
|
||||
@@ -11,13 +12,10 @@
|
||||
|
||||
namespace chillerlan\QRCode\Common;
|
||||
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QRCodeException;
|
||||
|
||||
use function array_column, array_combine, array_keys;
|
||||
|
||||
/**
|
||||
* Class Version
|
||||
*
|
||||
*/
|
||||
class Version{
|
||||
|
||||
|
||||
@@ -196,10 +196,16 @@ class QRData{
|
||||
}
|
||||
|
||||
// Padding: ISO/IEC 18004:2000 8.4.9 Bit stream to codeword conversion
|
||||
|
||||
// if the final codeword is not exactly 8 bits in length, it shall be made 8 bits long
|
||||
// by the addition of padding bits with binary value 0
|
||||
while($this->bitBuffer->getLength() % 8 !== 0){
|
||||
$this->bitBuffer->putBit(false);
|
||||
}
|
||||
|
||||
// The message bit stream shall then be extended to fill the data capacity of the symbol
|
||||
// corresponding to the Version and Error Correction Level, by the addition of the Pad
|
||||
// Codewords 11101100 and 00010001 alternately.
|
||||
while(true){
|
||||
|
||||
if($this->bitBuffer->getLength() >= $MAX_BITS){
|
||||
|
||||
Reference in New Issue
Block a user