: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
+2 -8
View File
@@ -26,9 +26,6 @@ require_once __DIR__.'/../vendor/autoload.php';
*/
class QRSvgWithLogo extends QRMarkupSVG{
/**
* @inheritDoc
*/
protected function paths():string{
$size = (int)ceil($this->moduleCount * $this->options->svgLogoScale);
@@ -41,9 +38,6 @@ class QRSvgWithLogo extends QRMarkupSVG{
return $svg;
}
/**
* @inheritDoc
*/
protected function path(string $path, int $M_TYPE):string{
// omit the "fill" and "opacity" attributes on the path element
return sprintf('<path class="%s" d="%s"/>', $this->getCssClass($M_TYPE), $path);
@@ -63,7 +57,7 @@ class QRSvgWithLogo extends QRMarkupSVG{
$this->options->svgLogoScale,
$this->options->svgLogoCssClass,
file_get_contents($this->options->svgLogo),
$this->options->eol
$this->options->eol,
);
}
@@ -146,7 +140,7 @@ $options->svgDefs = '
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
if(php_sapi_name() !== 'cli'){
if(PHP_SAPI !== 'cli'){
header('Content-type: image/svg+xml');
if(extension_loaded('zlib')){