🚿 extract OUTPUT_* constants from QRCode to QROutputInterface and mark QRCode::OUTPUT_* as deprecated

This commit is contained in:
smiley
2022-07-15 19:20:58 +02:00
parent b48a58462c
commit ae1c1f56ca
29 changed files with 200 additions and 110 deletions
+2 -4
View File
@@ -13,8 +13,6 @@
namespace chillerlan\QRCode\Output;
use chillerlan\QRCode\QRCode;
use function implode, is_string, json_encode;
/**
@@ -50,10 +48,10 @@ class QRString extends QROutputAbstract{
$file ??= $this->options->cachefile;
switch($this->options->outputType){
case QRCode::OUTPUT_STRING_TEXT:
case QROutputInterface::STRING_TEXT:
$data = $this->text();
break;
case QRCode::OUTPUT_STRING_JSON:
case QROutputInterface::STRING_JSON:
default:
$data = $this->json();
}