From 33b8b92d4afc3ba79f3d454123495ce6d3400cc3 Mon Sep 17 00:00:00 2001 From: Jonatas Souza Date: Mon, 11 Dec 2023 14:20:57 -0300 Subject: [PATCH] fixing cs --- src/Factory/LaravelQrCodeFactory.php | 16 ++++------------ src/StyleManager.php | 19 ++++++++++++------- src/Writer/EpsWriter.php | 1 - 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/Factory/LaravelQrCodeFactory.php b/src/Factory/LaravelQrCodeFactory.php index 5c3c823..df0236a 100644 --- a/src/Factory/LaravelQrCodeFactory.php +++ b/src/Factory/LaravelQrCodeFactory.php @@ -85,11 +85,8 @@ protected static function applyForeground(QrCodeInterface $qrCode, ?array $foreg * @param string|null $gradientType * @return void */ - protected static function applyForeground2( - QrCodeInterface $qrCode, - ?array $foreground2, - ?string $gradientType - ): void + protected static function applyForeground2(QrCodeInterface $qrCode, ?array $foreground2, + ?string $gradientType): void { if (is_null($foreground2)) { return; @@ -216,13 +213,8 @@ protected static function buildQrCode($content, ?string $format): QrCodeInterfac return new QrCode($qrCodeFormat->getText()); } - protected static function applyLabel( - QrCodeInterface $qrCode, - ?string $label = null, - ?string $fontPath = null, - ?int $size = null, - ?string $alignment = null - ): void + protected static function applyLabel(QrCodeInterface $qrCode, ?string $label = null, + ?string $fontPath = null, ?int $size = null, ?string $alignment = null ): void { if (! is_null($label)) { $qrCode->setLabel(new Label( diff --git a/src/StyleManager.php b/src/StyleManager.php index 595cc6d..2ff450a 100644 --- a/src/StyleManager.php +++ b/src/StyleManager.php @@ -53,8 +53,13 @@ class StyleManager implements PathStyleInterface, ColorsInterface * @param string|null $gradientType * @throws Exception */ - public function __construct($foregroundColor, $backgroundColor, string $pathStyle = null, float $styleIntensity = null, $gradientType = null) - { + public function __construct( + $foregroundColor, + $backgroundColor, + string $pathStyle = null, + float $styleIntensity = null, + $gradientType = null + ) { $this->setForegroundColor($foregroundColor); $this->setBackgroundColor($backgroundColor); @@ -238,12 +243,12 @@ public function buildFillColor() $this->getGradientTye(), ) ); - } else { - return Fill::uniformColor( - $this->getBackgroundColor(), - $this->getForegroundColor() - ); } + + return Fill::uniformColor( + $this->getBackgroundColor(), + $this->getForegroundColor() + ); } /** diff --git a/src/Writer/EpsWriter.php b/src/Writer/EpsWriter.php index 7c94b79..be7bbce 100644 --- a/src/Writer/EpsWriter.php +++ b/src/Writer/EpsWriter.php @@ -33,7 +33,6 @@ public function __construct() public function writeString(QrCodeInterface $qrCode): string { $renderer = $this->buildRenderer($qrCode); - ; $writer = new Writer($renderer);