From b9308cd4fc049cac1a150ae5ab01c882d4607201 Mon Sep 17 00:00:00 2001 From: Manuel Reinhard Date: Sun, 1 Oct 2023 16:52:42 +0200 Subject: [PATCH 1/3] Change return type from self to static in abstract class --- src/PaymentPart/Output/AbstractOutput.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PaymentPart/Output/AbstractOutput.php b/src/PaymentPart/Output/AbstractOutput.php index 928e0667..ab161070 100644 --- a/src/PaymentPart/Output/AbstractOutput.php +++ b/src/PaymentPart/Output/AbstractOutput.php @@ -34,7 +34,7 @@ public function getLanguage(): ?string return $this->language; } - public function setPrintable(bool $printable): self + public function setPrintable(bool $printable): static { $this->printable = $printable; @@ -46,7 +46,7 @@ public function isPrintable(): bool return $this->printable; } - public function setQrCodeImageFormat(string $fileExtension): self + public function setQrCodeImageFormat(string $fileExtension): static { $this->qrCodeImageFormat = $fileExtension; From 16ad50ee3d928221125e9a17165ba354d0aa2de8 Mon Sep 17 00:00:00 2001 From: Manuel Reinhard Date: Sun, 1 Oct 2023 16:52:53 +0200 Subject: [PATCH 2/3] Remove unneeded local variable --- src/PaymentPart/Output/AbstractOutput.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PaymentPart/Output/AbstractOutput.php b/src/PaymentPart/Output/AbstractOutput.php index ab161070..4a23642f 100644 --- a/src/PaymentPart/Output/AbstractOutput.php +++ b/src/PaymentPart/Output/AbstractOutput.php @@ -164,8 +164,6 @@ protected function getFurtherInformationElements(): array protected function getQrCode(): QrCode { - $qrCode = $this->qrBill->getQrCode($this->getQrCodeImageFormat()); - - return $qrCode; + return $this->qrBill->getQrCode($this->getQrCodeImageFormat()); } } From f736e3b689f9318e007cc2dcd18d6e28271aa2d9 Mon Sep 17 00:00:00 2001 From: Manuel Reinhard Date: Sun, 1 Oct 2023 16:59:38 +0200 Subject: [PATCH 3/3] Fix return type in FpdfOutput --- src/PaymentPart/Output/FpdfOutput/FpdfOutput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PaymentPart/Output/FpdfOutput/FpdfOutput.php b/src/PaymentPart/Output/FpdfOutput/FpdfOutput.php index 61d1b77b..4da32770 100644 --- a/src/PaymentPart/Output/FpdfOutput/FpdfOutput.php +++ b/src/PaymentPart/Output/FpdfOutput/FpdfOutput.php @@ -82,7 +82,7 @@ public function getPaymentPart(): void $this->addFurtherInformationContent(); } - public function setQrCodeImageFormat(string $fileExtension): AbstractOutput + public function setQrCodeImageFormat(string $fileExtension): static { if (QrCode::FILE_FORMAT_SVG === $fileExtension) { throw new InvalidFpdfImageFormat('SVG images are not allowed by FPDF.');