From 9259ac39f386c3d5461815b4a0641e3b11e898cc Mon Sep 17 00:00:00 2001 From: matheushrm Date: Fri, 14 Feb 2025 11:33:12 -0300 Subject: [PATCH] change: add explicit nullable to parameters --- lib/Qrcode/Decoder/Decoder.php | 2 +- lib/Qrcode/Detector/Detector.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Qrcode/Decoder/Decoder.php b/lib/Qrcode/Decoder/Decoder.php index c88279e..c6b0f89 100644 --- a/lib/Qrcode/Decoder/Decoder.php +++ b/lib/Qrcode/Decoder/Decoder.php @@ -147,7 +147,7 @@ public function decodeBits(\Zxing\Common\BitMatrix $bits, $hints = null): string } } - private function decodeParser(\Zxing\Qrcode\Decoder\BitMatrixParser $parser, array $hints = null): DecoderResult + private function decodeParser(\Zxing\Qrcode\Decoder\BitMatrixParser $parser, ?array $hints = null): DecoderResult { $version = $parser->readVersion(); $ecLevel = $parser->readFormatInformation()->getErrorCorrectionLevel(); diff --git a/lib/Qrcode/Detector/Detector.php b/lib/Qrcode/Detector/Detector.php index f3dac17..9bd4734 100644 --- a/lib/Qrcode/Detector/Detector.php +++ b/lib/Qrcode/Detector/Detector.php @@ -52,7 +52,7 @@ public function __construct(private BitMatrix $image) * @throws NotFoundException if QR Code cannot be found * @throws FormatException if a QR Code cannot be decoded */ - final public function detect(array $hints = null): DetectorResult + final public function detect(?array $hints = null): DetectorResult {/*Map*/ $resultPointCallback = ($hints !== null && array_key_exists('NEED_RESULT_POINT_CALLBACK', $hints)) ?