From 4167286f65bcb1a477c4153edf03ab2413138dbd Mon Sep 17 00:00:00 2001 From: codemasher Date: Thu, 7 Jan 2021 11:17:51 +0100 Subject: [PATCH] :wrench: --- src/Common/EccLevel.php | 7 +++++++ src/Data/QRMatrix.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Common/EccLevel.php b/src/Common/EccLevel.php index 7f2a7d196..1c8693822 100644 --- a/src/Common/EccLevel.php +++ b/src/Common/EccLevel.php @@ -213,6 +213,13 @@ final class EccLevel{ $this->eccLevel = $eccLevel; } + /** + * returns the current ECC level + */ + public function getLevel():int{ + return $this->eccLevel; + } + /** * returns the ordinal value of the current ECC level */ diff --git a/src/Data/QRMatrix.php b/src/Data/QRMatrix.php index 185089853..cb9def0f0 100755 --- a/src/Data/QRMatrix.php +++ b/src/Data/QRMatrix.php @@ -438,7 +438,7 @@ final class QRMatrix{ public function setLogoSpace(int $width, int $height, int $startX = null, int $startY = null):QRMatrix{ // for logos we operate in ECC H (30%) only - if($this->eccLevel->getOrdinal() !== EccLevel::H){ + if($this->eccLevel->getLevel() !== EccLevel::H){ throw new QRCodeDataException('ECC level "H" required to add logo space'); }