🚿 extract version and mask pattern constants from QRCode to their respective classes and mark QRCode::VERSION_AUTO and QRCode::MASK_PATTERN_AUTO as deprecated

This commit is contained in:
smiley
2022-07-14 19:22:37 +02:00
parent 3cd977b2b2
commit b48a58462c
7 changed files with 33 additions and 22 deletions
+1 -2
View File
@@ -11,7 +11,6 @@
namespace chillerlan\QRCode\Data;
use chillerlan\QRCode\Common\{BitBuffer, EccLevel, MaskPattern, Mode, Version};
use chillerlan\QRCode\QRCode;
use chillerlan\Settings\SettingsContainerInterface;
use function sprintf;
@@ -79,7 +78,7 @@ final class QRData{
public function setData(array $dataSegments):self{
$this->dataSegments = $dataSegments;
$version = $this->options->version === QRCode::VERSION_AUTO
$version = $this->options->version === Version::AUTO
? $this->getMinimumVersion()
: $this->options->version;