:octocat: integrate reader into QRCode, extract LuminanceSourceInterface

This commit is contained in:
codemasher
2021-11-19 15:49:53 +01:00
parent 9bfe5e1880
commit 5e9cf0047e
9 changed files with 170 additions and 158 deletions
+2 -2
View File
@@ -31,12 +31,12 @@ final class Decoder{
* <p>Decodes a QR Code represented as a {@link \chillerlan\QRCode\Decoder\BitMatrix}.
* A 1 or "true" is taken to mean a black module.</p>
*
* @param \chillerlan\QRCode\Decoder\LuminanceSource $source
* @param \chillerlan\QRCode\Decoder\LuminanceSourceInterface $source
*
* @return \chillerlan\QRCode\Decoder\DecoderResult text and bytes encoded within the QR Code
* @throws \Exception if the QR Code cannot be decoded
*/
public function decode(LuminanceSource $source):DecoderResult{
public function decode(LuminanceSourceInterface $source):DecoderResult{
$matrix = (new Binarizer($source))->getBlackMatrix();
$bitMatrix = (new Detector($matrix))->detect();