:octocat: ReedSolomonEncoder: add constructor

This commit is contained in:
smiley
2023-01-31 19:05:23 +01:00
parent 8eb54d4eef
commit a02012a283
2 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -595,7 +595,7 @@ class QRMatrix{
* Maps the interleaved binary $data on the matrix
*/
public function writeCodewords(BitBuffer $bitBuffer):self{
$data = (new ReedSolomonEncoder)->interleaveEcBytes($bitBuffer, $this->version, $this->eccLevel);
$data = (new ReedSolomonEncoder($this->version, $this->eccLevel))->interleaveEcBytes($bitBuffer);
$byteCount = count($data);
$iByte = 0;
$iBit = 7;