mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-19 10:15:21 +00:00
:octocat: fix PHPCS config, add Slevomat rules
This commit is contained in:
@@ -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')){
|
||||
|
||||
Reference in New Issue
Block a user