Skip to content

Commit 0ac2d49

Browse files
committed
:octocat: add default value for QRMarkup::getCssClass()
1 parent b37fa3e commit 0ac2d49

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Output/QRMarkup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function dump(string $file = null):string{
8282
/**
8383
* returns a string with all css classes for the current element
8484
*/
85-
protected function getCssClass(int $M_TYPE):string{
85+
protected function getCssClass(int $M_TYPE = 0):string{
8686
return $this->options->cssClass;
8787
}
8888

src/Output/QRMarkupHTML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class QRMarkupHTML extends QRMarkup{
2323
protected function createMarkup(bool $saveToFile):string{
2424
$html = empty($this->options->cssClass)
2525
? '<div>'
26-
: sprintf('<div class="%s">', $this->getCssClass(0)); // @todo $M_TYPE
26+
: sprintf('<div class="%s">', $this->getCssClass());
2727

2828
$html .= $this->options->eol;
2929

src/Output/QRMarkupSVG.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function path(string $path, int $M_TYPE):string{
142142
/**
143143
* @inheritDoc
144144
*/
145-
protected function getCssClass(int $M_TYPE):string{
145+
protected function getCssClass(int $M_TYPE = 0):string{
146146
return implode(' ', [
147147
'qr-'.($this::LAYERNAMES[$M_TYPE] ?? $M_TYPE),
148148
(($M_TYPE & QRMatrix::IS_DARK) === QRMatrix::IS_DARK) ? 'dark' : 'light',

0 commit comments

Comments
 (0)