mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-24 12:57:53 +00:00
🛀 data mode rework
This commit is contained in:
+7
-5
@@ -62,8 +62,8 @@ class ECI extends QRDataModeAbstract{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function __construct(BitBuffer $bitBuffer, int $encoding){
|
||||
parent::__construct($bitBuffer, '');
|
||||
public function __construct(int $encoding){
|
||||
parent::__construct('');
|
||||
|
||||
$this->encoding = $encoding;
|
||||
}
|
||||
@@ -85,9 +85,11 @@ class ECI extends QRDataModeAbstract{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function write(int $version):void{
|
||||
$this->bitBuffer->put(QRCode::DATA_ECI, 4);
|
||||
$this->bitBuffer->put($this->encoding, 8);
|
||||
public function write(BitBuffer $bitBuffer, int $version):void{
|
||||
$bitBuffer
|
||||
->put(QRCode::DATA_ECI, 4)
|
||||
->put($this->encoding, 8)
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user