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