: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
+3 -9
View File
@@ -28,9 +28,6 @@ require_once __DIR__.'/../vendor/autoload.php';
*/
class QRSvgWithLogoAndCustomShapes extends QRMarkupSVG{
/**
* @inheritDoc
*/
protected function paths():string{
// make sure connect paths is enabled
$this->options->connectPaths = true;
@@ -48,9 +45,6 @@ class QRSvgWithLogoAndCustomShapes 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);
@@ -103,7 +97,7 @@ class QRSvgWithLogoAndCustomShapes extends QRMarkupSVG{
'%s<path class="%s" d="%s"/>',
$this->options->eol,
$this->getCssClass(QRMatrix::M_FINDER_DARK),
implode(' ', $finder)
implode(' ', $finder),
);
}
@@ -121,7 +115,7 @@ class QRSvgWithLogoAndCustomShapes extends QRMarkupSVG{
$this->options->svgLogoScale,
$this->options->svgLogoCssClass,
file_get_contents($this->options->svgLogo),
$this->options->eol
$this->options->eol,
);
}
@@ -199,7 +193,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')){