Skip to content

Commit 7223365

Browse files
author
Nikhil Goyal
committed
Allow passing $hints to decode()
1 parent a75482d commit 7223365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/QrReader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ public function __construct($imgSource, $sourceType = QrReader::SOURCE_TYPE_FILE
7474
$this->reader = new QRCodeReader();
7575
}
7676

77-
public function decode()
77+
public function decode($hints = null)
7878
{
7979
try {
80-
$this->result = $this->reader->decode($this->bitmap);
80+
$this->result = $this->reader->decode($this->bitmap, $hints);
8181
} catch (NotFoundException $er) {
8282
$this->result = false;
8383
} catch (FormatException $er) {
@@ -87,9 +87,9 @@ public function decode()
8787
}
8888
}
8989

90-
public function text()
90+
public function text($hints = null)
9191
{
92-
$this->decode();
92+
$this->decode($hints);
9393

9494
if (method_exists($this->result, 'toString')) {
9595
return $this->result->toString();

0 commit comments

Comments
 (0)