aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php')
-rw-r--r--vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php b/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php
index 06d6e88cb..1f7843182 100644
--- a/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php
+++ b/vendor/chillerlan/php-qrcode/src/Output/QRMarkup.php
@@ -53,7 +53,7 @@ class QRMarkup extends QROutputAbstract{
/**
* HTML output
*/
- protected function html(string $file = null):string{
+ protected function html(?string $file = null):string{
$html = empty($this->options->cssClass)
? '<div>'
@@ -74,9 +74,11 @@ class QRMarkup extends QROutputAbstract{
$html .= '</div>'.$this->options->eol;
if($file !== null){
- return '<!DOCTYPE html>'.
- '<head><meta charset="UTF-8"><title>QR Code</title></head>'.
- '<body>'.$this->options->eol.$html.'</body>';
+ /** @noinspection HtmlRequiredLangAttribute */
+ return sprintf(
+ '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>QR Code</title></head><body>%s</body></html>',
+ $this->options->eol.$html
+ );
}
return $html;
@@ -87,7 +89,7 @@ class QRMarkup extends QROutputAbstract{
*
* @see https://github.com/codemasher/php-qrcode/pull/5
*/
- protected function svg(string $file = null):string{
+ protected function svg(?string $file = null):string{
$matrix = $this->matrix->matrix();
$svg = sprintf($this->svgHeader, $this->options->cssClass, $this->options->svgViewBoxSize ?? $this->moduleCount)