:octocat: fix PHPCS config, add Slevomat rules

This commit is contained in:
smiley
2024-07-21 14:54:15 +02:00
parent 89cdd09044
commit f32696c8a7
97 changed files with 462 additions and 654 deletions
+6 -4
View File
@@ -24,13 +24,11 @@ require_once __DIR__.'/../vendor/autoload.php';
class QRImageWithLogo extends QRGdImagePNG{
/**
* @param string|null $file
* @param string|null $logo
*
* @return string
* @throws \chillerlan\QRCode\Output\QRCodeOutputException
*/
public function dump(string|null $file = null, string|null $logo = null):string{
$logo ??= '';
// set returnResource to true to skip further processing for now
$this->options->returnResource = true;
@@ -45,6 +43,10 @@ class QRImageWithLogo extends QRGdImagePNG{
$im = imagecreatefrompng($logo);
if($im === false){
throw new QRCodeOutputException('imagecreatefrompng() error');
}
// get logo image size
$w = imagesx($im);
$h = imagesy($im);