diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-09 02:49:56 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-09 03:08:30 +0000 |
| commit | e41d6361221a30ca9d996cde7591111e626b7e1c (patch) | |
| tree | 4572f61f37bbc76192ad60e0940c281483bc03af /vendor/chillerlan/php-qrcode/src/Decoder | |
| parent | ab0aabf8548c206f3f624de5451a9b6abbde90be (diff) | |
Remove dev dependencies and update the rest.
Diffstat (limited to 'vendor/chillerlan/php-qrcode/src/Decoder')
| -rw-r--r-- | vendor/chillerlan/php-qrcode/src/Decoder/Decoder.php | 5 | ||||
| -rw-r--r-- | vendor/chillerlan/php-qrcode/src/Decoder/DecoderResult.php | 17 |
2 files changed, 14 insertions, 8 deletions
diff --git a/vendor/chillerlan/php-qrcode/src/Decoder/Decoder.php b/vendor/chillerlan/php-qrcode/src/Decoder/Decoder.php index 6f369a6df..4549accc7 100644 --- a/vendor/chillerlan/php-qrcode/src/Decoder/Decoder.php +++ b/vendor/chillerlan/php-qrcode/src/Decoder/Decoder.php @@ -29,6 +29,7 @@ final class Decoder{ private ?EccLevel $eccLevel = null; private ?MaskPattern $maskPattern = null; private BitBuffer $bitBuffer; + private Detector $detector; /** * Decodes a QR Code represented as a BitMatrix. @@ -37,7 +38,8 @@ final class Decoder{ * @throws \Throwable|\chillerlan\QRCode\Decoder\QRCodeDecoderException */ public function decode(LuminanceSourceInterface $source):DecoderResult{ - $matrix = (new Detector($source))->detect(); + $this->detector = new Detector($source); + $matrix = $this->detector->detect(); try{ // clone the BitMatrix to avoid errors in case we run into mirroring @@ -148,6 +150,7 @@ final class Decoder{ 'data' => $result, 'version' => $this->version, 'eccLevel' => $this->eccLevel, + 'finderPatterns' => $this->detector->getFinderPatterns(), 'maskPattern' => $this->maskPattern, 'structuredAppendParity' => $parityData, 'structuredAppendSequence' => $symbolSequence, diff --git a/vendor/chillerlan/php-qrcode/src/Decoder/DecoderResult.php b/vendor/chillerlan/php-qrcode/src/Decoder/DecoderResult.php index 13fd24ba8..ef0f245d9 100644 --- a/vendor/chillerlan/php-qrcode/src/Decoder/DecoderResult.php +++ b/vendor/chillerlan/php-qrcode/src/Decoder/DecoderResult.php @@ -20,13 +20,14 @@ use function property_exists; * applies to 2D barcode formats. For now, it contains the raw bytes obtained * as well as a String interpretation of those bytes, if applicable. * - * @property \chillerlan\QRCode\Common\BitBuffer $rawBytes - * @property string $data - * @property \chillerlan\QRCode\Common\Version $version - * @property \chillerlan\QRCode\Common\EccLevel $eccLevel - * @property \chillerlan\QRCode\Common\MaskPattern $maskPattern - * @property int $structuredAppendParity - * @property int $structuredAppendSequence + * @property \chillerlan\QRCode\Common\BitBuffer $rawBytes + * @property string $data + * @property \chillerlan\QRCode\Common\Version $version + * @property \chillerlan\QRCode\Common\EccLevel $eccLevel + * @property \chillerlan\QRCode\Common\MaskPattern $maskPattern + * @property int $structuredAppendParity + * @property int $structuredAppendSequence + * @property \chillerlan\QRCode\Detector\FinderPattern[] $finderPatterns */ final class DecoderResult{ @@ -37,6 +38,8 @@ final class DecoderResult{ private string $data = ''; private int $structuredAppendParity = -1; private int $structuredAppendSequence = -1; + /** @var \chillerlan\QRCode\Detector\FinderPattern[] */ + private array $finderPatterns = []; /** * DecoderResult constructor. |