mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-04 22:48:24 +00:00
:octocat: add default value for QRMarkup::getCssClass()
This commit is contained in:
@@ -82,7 +82,7 @@ abstract class QRMarkup extends QROutputAbstract{
|
||||
/**
|
||||
* returns a string with all css classes for the current element
|
||||
*/
|
||||
protected function getCssClass(int $M_TYPE):string{
|
||||
protected function getCssClass(int $M_TYPE = 0):string{
|
||||
return $this->options->cssClass;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class QRMarkupHTML extends QRMarkup{
|
||||
protected function createMarkup(bool $saveToFile):string{
|
||||
$html = empty($this->options->cssClass)
|
||||
? '<div>'
|
||||
: sprintf('<div class="%s">', $this->getCssClass(0)); // @todo $M_TYPE
|
||||
: sprintf('<div class="%s">', $this->getCssClass());
|
||||
|
||||
$html .= $this->options->eol;
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class QRMarkupSVG extends QRMarkup{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function getCssClass(int $M_TYPE):string{
|
||||
protected function getCssClass(int $M_TYPE = 0):string{
|
||||
return implode(' ', [
|
||||
'qr-'.($this::LAYERNAMES[$M_TYPE] ?? $M_TYPE),
|
||||
(($M_TYPE & QRMatrix::IS_DARK) === QRMatrix::IS_DARK) ? 'dark' : 'light',
|
||||
|
||||
Reference in New Issue
Block a user