🛀 QRDataModeInterface: validate data on init, test cleanup

This commit is contained in:
codemasher
2021-11-28 18:25:06 +01:00
parent 3d563bfcc0
commit 48b6c21090
12 changed files with 71 additions and 203 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ namespace chillerlan\QRCode\Data;
use chillerlan\QRCode\Common\{BitBuffer, Mode};
use function ord;
use function chr, ord;
/**
* Byte mode, ISO-8859-1 or UTF-8
@@ -76,7 +76,7 @@ final class Byte extends QRDataModeAbstract{
$readBytes = '';
for($i = 0; $i < $length; $i++){
$readBytes .= \chr($bitBuffer->read(8));
$readBytes .= chr($bitBuffer->read(8));
}
return $readBytes;