:octocat: use a proper constant for data mode

This commit is contained in:
smiley
2023-03-16 11:20:33 +01:00
parent f13300c304
commit 3e0a4655aa
11 changed files with 40 additions and 35 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ final class QRData{
foreach($this->dataSegments as $segment){
// data length in bits of the current segment +4 bits for each mode descriptor
$length += ($segment->getLengthInBits() + Mode::getLengthBitsForVersion($segment->getDataMode(), 1) + 4);
$length += ($segment->getLengthInBits() + Mode::getLengthBitsForVersion($segment::DATAMODE, 1) + 4);
if(!$segment instanceof ECI){
// mode length bits margin to the next breakpoint