Skip to content

Commit 28b6e2c

Browse files
committed
:octocat:
1 parent 71509a5 commit 28b6e2c

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

examples/reader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// please excuse the IDE yelling https://youtrack.jetbrains.com/issue/WI-66549
1616
$options = new QROptions;
1717
$options->readerUseImagickIfAvailable = false;
18-
$options->readerGrayscale = true;
19-
$options->readerIncreaseContrast = true;
18+
$options->readerGrayscale = true;
19+
$options->readerIncreaseContrast = true;
2020

2121
try{
2222
$result = (new QRCode($options))->readFromFile(__DIR__.'/../.github/images/example_image.png');

examples/svgMeltedModules.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* eliminate hairline antialias "cracks" that tend to appear when two SVG paths are exactly adjacent to each other.
66
*
77
* @see https://github.com/chillerlan/php-qrcode/issues/127
8+
* @see ./shapes.svg
89
*/
910

1011
use chillerlan\QRCode\{QRCode, QROptions};
@@ -48,7 +49,7 @@ protected function collectModules(Closure $transform):array{
4849
$M_TYPE_LAYER = QRMatrix::M_DATA;
4950

5051
if($this->matrix->check($x, $y)){
51-
$M_TYPE_LAYER |= QRMatrix::IS_DARK;
52+
$M_TYPE_LAYER = QRMatrix::M_DATA_DARK;
5253
}
5354
}
5455

examples/svgRandomColoredDots.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function collectModules(Closure $transform):array{
5353
$M_TYPE_LAYER = QRMatrix::M_DATA;
5454

5555
if($this->matrix->check($x, $y)){
56-
$M_TYPE_LAYER |= QRMatrix::IS_DARK;
56+
$M_TYPE_LAYER = QRMatrix::M_DATA_DARK;
5757
}
5858
}
5959

examples/svgRoundQuietzone.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function createMarkup(bool $saveToFile):string{
4444
$this->colorQuietzone($quietzoneSize, ($diameter / 2));
4545

4646
// calculate the logo space
47-
$logoSpaceSize = (int)ceil($this->moduleCount * $this->options->svgLogoScale);
47+
$logoSpaceSize = (int)(ceil($this->moduleCount * $this->options->svgLogoScale) + 1);
4848
// we're calling QRMatrix::setLogoSpace() manually, so QROptions::$addLogoSpace has no effect here
4949
$this->matrix->setLogoSpace($logoSpaceSize);
5050

@@ -185,7 +185,7 @@ protected function collectModules(Closure $transform):array{
185185
$M_TYPE_LAYER = QRMatrix::M_DATA;
186186

187187
if($this->matrix->check($x, $y)){
188-
$M_TYPE_LAYER |= QRMatrix::IS_DARK;
188+
$M_TYPE_LAYER = QRMatrix::M_DATA_DARK;
189189
}
190190
}
191191

@@ -335,7 +335,7 @@ protected function set_svgLogoScale(float $svgLogoScale):void{
335335
QRMatrix::M_FINDER_DARK,
336336
QRMatrix::M_FINDER_DOT,
337337
QRMatrix::M_ALIGNMENT_DARK,
338-
(QRMatrix::M_QUIETZONE | QRMatrix::IS_DARK),
338+
QRMatrix::M_QUIETZONE_DARK,
339339
],
340340
'drawCircularModules' => true,
341341
'circleRadius' => 0.4,

src/Output/QRMarkup.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ protected function getCssClass(int $M_TYPE = 0):string{
8787
}
8888

8989
/**
90-
*
90+
* returns the fully parsed and rendered markup string for the given input
9191
*/
9292
abstract protected function createMarkup(bool $saveToFile):string;
93+
9394
}

src/Output/QROutputAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ protected function collectModules(Closure $transform):array{
187187
$M_TYPE_LAYER = QRMatrix::M_DATA;
188188

189189
if($this->matrix->check($x, $y)){
190-
$M_TYPE_LAYER |= QRMatrix::IS_DARK;
190+
$M_TYPE_LAYER = QRMatrix::M_DATA_DARK;
191191
}
192192
}
193193

tests/Data/QRMatrixTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function testGetSetCheck():void{
176176
public static function matrixProvider():Generator{
177177
$ecc = new EccLevel(EccLevel::L);
178178

179-
foreach(range(1, 40) as $i){
179+
for($i = 1; $i <= 40; $i++){
180180
yield 'version: '.$i => [new QRMatrix(new Version($i), $ecc)];
181181
}
182182
}

0 commit comments

Comments
 (0)