2525use Zxing \DecodeHintType ;
2626use Zxing \FormatException ;
2727use Zxing \NotFoundException ;
28- use Zxing \Qrcode \Decoder \Version ;
2928use Zxing \ResultPoint ;
3029use Zxing \ResultPointCallback ;
3130
@@ -54,7 +53,6 @@ public function __construct(private BitMatrix $image)
5453 */
5554 final public function detect (array $ hints = null ): DetectorResult
5655 {/*Map<DecodeHintType,?>*/
57-
5856 $ resultPointCallback = ($ hints !== null && array_key_exists ('NEED_RESULT_POINT_CALLBACK ' , $ hints )) ?
5957 $ hints ['NEED_RESULT_POINT_CALLBACK ' ] : null ;
6058 /* resultPointCallback = hints == null ? null :
@@ -82,7 +80,6 @@ final protected function processFinderPatternInfo(FinderPatternInfo $info): \Zxi
8280 $ alignmentPattern = null ;
8381 // Anything above version 1 has an alignment pattern
8482 if ((is_countable ($ provisionalVersion ->getAlignmentPatternCenters ()) ? count ($ provisionalVersion ->getAlignmentPatternCenters ()) : 0 ) > 0 ) {
85-
8683 // Guess where a "bottom right" finder pattern would have been
8784 $ bottomRightX = $ topRight ->getX () - $ topLeft ->getX () + $ bottomLeft ->getX ();
8885 $ bottomRightY = $ topRight ->getY () - $ topLeft ->getY () + $ bottomLeft ->getY ();
@@ -405,7 +402,7 @@ private static function createTransform(
405402 }
406403
407404 private static function sampleGrid (
408- $ image ,
405+ BitMatrix $ image ,
409406 PerspectiveTransform $ transform ,
410407 int $ dimension
411408 ): \Zxing \Common \BitMatrix {
@@ -414,7 +411,7 @@ private static function sampleGrid(
414411 return $ sampler ->sampleGrid_ ($ image , $ dimension , $ dimension , $ transform );
415412 }
416413
417- final protected function getImage ()
414+ final protected function getImage (): BitMatrix
418415 {
419416 return $ this ->image ;
420417 }
0 commit comments