From bff7b8ca38d7e15e75e36deadaef6d9250af4221 Mon Sep 17 00:00:00 2001 From: endroid Date: Tue, 21 Aug 2018 20:10:48 +0000 Subject: [PATCH] Create individual setters --- README.md | 2 +- src/QrCode.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e513ab3..f877b72 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ $qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); $qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); $qrCode->setLabel('Scan the code', 16, __DIR__.'/../assets/fonts/noto_sans.otf', LabelAlignment::CENTER); $qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png'); -$qrCode->setLogoWidth(150); +$qrCode->setLogoSize(150, 200); $qrCode->setRoundBlockSize(true); $qrCode->setValidateResult(false); $qrCode->setWriterOptions(['exclude_xml_declaration' => true]); diff --git a/src/QrCode.php b/src/QrCode.php index be80ea4..164ce05 100644 --- a/src/QrCode.php +++ b/src/QrCode.php @@ -178,13 +178,8 @@ public function setLogoSize(int $logoWidth, int $logoHeight = null): void $this->logoHeight = $logoHeight; } - /** - * @deprecated - */ public function setLogoWidth(int $logoWidth): void { - trigger_error('Method ' . __METHOD__ . ' is deprecated: use setLogoSize', E_USER_DEPRECATED); - $this->logoWidth = $logoWidth; } @@ -193,6 +188,11 @@ public function getLogoWidth(): ?int return $this->logoWidth; } + public function setLogoHeight(int $logoHeight): void + { + $this->logoHeight = $logoHeight; + } + public function getLogoHeight(): ?int { return $this->logoHeight;