From 334fe5a42f16d38c8a14477e7f9408c528cb830f Mon Sep 17 00:00:00 2001 From: smiley Date: Wed, 25 Oct 2023 23:00:15 +0200 Subject: [PATCH] :shower: phpcs happy --- examples/imageWithRoundedShapes.php | 8 ++++---- examples/imagickImageAsBackground.php | 2 -- examples/text.php | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/imageWithRoundedShapes.php b/examples/imageWithRoundedShapes.php index 7e05fbbf5..687ca7d0d 100644 --- a/examples/imageWithRoundedShapes.php +++ b/examples/imageWithRoundedShapes.php @@ -62,28 +62,28 @@ class QRGdRounded extends QRGdImagePNG{ // Outer rounding // ------------------ - if($neighbours & (1 << 7)){ // neighbour left + if(($neighbours & (1 << 7))){ // neighbour left // top left imagefilledrectangle($this->image, $x1, $y1, ($x1 + $rectsize), ($y1 + $rectsize), $light); // bottom left imagefilledrectangle($this->image, $x1, ($y2 - $rectsize), ($x1 + $rectsize), $y2, $light); } - if($neighbours & (1 << 3)){ // neighbour right + if(($neighbours & (1 << 3))){ // neighbour right // top right imagefilledrectangle($this->image, ($x2 - $rectsize), $y1, $x2, ($y1 + $rectsize), $light); // bottom right imagefilledrectangle($this->image, ($x2 - $rectsize), ($y2 - $rectsize), $x2, $y2, $light); } - if($neighbours & (1 << 1)){ // neighbour top + if(($neighbours & (1 << 1))){ // neighbour top // top left imagefilledrectangle($this->image, $x1, $y1, ($x1 + $rectsize), ($y1 + $rectsize), $light); // top right imagefilledrectangle($this->image, ($x2 - $rectsize), $y1, $x2, ($y1 + $rectsize), $light); } - if($neighbours & (1 << 5)){ // neighbour bottom + if(($neighbours & (1 << 5))){ // neighbour bottom // bottom left imagefilledrectangle($this->image, $x1, ($y2 - $rectsize), ($x1 + $rectsize), $y2, $light); // bottom right diff --git a/examples/imagickImageAsBackground.php b/examples/imagickImageAsBackground.php index 0c6ae3fc2..10a4be3ad 100644 --- a/examples/imagickImageAsBackground.php +++ b/examples/imagickImageAsBackground.php @@ -112,5 +112,3 @@ if(PHP_SAPI !== 'cli'){ } exit; - - diff --git a/examples/text.php b/examples/text.php index aaa2b2ee3..837e32f83 100644 --- a/examples/text.php +++ b/examples/text.php @@ -44,6 +44,6 @@ $options->moduleValues = [ $out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ'); -echo "\n\n\n$out\n\n\n"; +printf("\n\n\n%s\n\n\n", $out); exit;