diff --git a/src/Decoder/Decoder.php b/src/Decoder/Decoder.php index ed4b7af50..95ae74e22 100644 --- a/src/Decoder/Decoder.php +++ b/src/Decoder/Decoder.php @@ -255,7 +255,7 @@ final class Decoder{ } return new DecoderResult([ - 'rawBytes' => $bytes, + 'rawBytes' => $bitBuffer, 'data' => $result, 'version' => $this->version, 'eccLevel' => $this->eccLevel, diff --git a/src/Decoder/DecoderResult.php b/src/Decoder/DecoderResult.php index 444cc6912..72e4d964f 100644 --- a/src/Decoder/DecoderResult.php +++ b/src/Decoder/DecoderResult.php @@ -30,7 +30,7 @@ use function property_exists; */ final class DecoderResult{ - private array $rawBytes; + private BitBuffer $rawBytes; private string $data; private Version $version; private EccLevel $eccLevel; @@ -90,7 +90,7 @@ final class DecoderResult{ public function getMatrix():QRMatrix{ return (new QRMatrix($this->version, $this->eccLevel, $this->maskPattern)) ->initFunctionalPatterns() - ->writeCodewords(new BitBuffer($this->rawBytes)) + ->writeCodewords($this->rawBytes) ->mask() ; }