Skip to content

Commit 5597812

Browse files
committed
🚿
1 parent 6c135ba commit 5597812

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

examples/Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
- [SVG with a round shape and randomly filled quiet zone](./svgRoundQuietzone.php): example similar to the QR Codes of a certain vendor ([#137](https://github.com/chillerlan/php-qrcode/discussions/137))
2727
- [SVG with logo, custom module shapes and custom finder patterns](./svgWithLogoAndCustomShapes.php): module- and finder pattern customization ([#150](https://github.com/chillerlan/php-qrcode/discussions/150))
2828

29+
2930
## Other examples
3031

3132
- [Authenticator](./authenticator.php): create a QR Code that displays an URI for a mobile authenticator (featuring [`chillerlan/php-authenticator`](https://github.com/chillerlan/php-authenticator))
3233
- [Interactive output](./qrcode-interactive.php): interactive demo (via [index.html](./index.html))
3334
- [Custom module shapes](./shapes.svg): SVG paths to customize the module shapes ([#150](https://github.com/chillerlan/php-qrcode/discussions/150))
35+
36+
37+
Please note that the examples are self-contained, meaning that all custom classes are defined in an example file, so they don't necessarily respect the PSR-4 one file = one class principle.

examples/image.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
];
6363

6464

65-
$im = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
65+
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
6666

6767
header('Content-type: image/png');
6868

69-
echo $im;
69+
echo $out;
7070

7171
exit;

src/QROptionsTrait.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ trait QROptionsTrait{
205205
* Module values map
206206
*
207207
* - QRImagick, QRMarkupHTML, QRMarkupSVG: #ABCDEF, cssname, rgb(), rgba()...
208-
* - QREps, QRFpdf, QRGdImage: [63, 127, 255] // R, G, B
208+
* - QREps, QRFpdf, QRGdImage: [R, G, B] // 0-255
209+
* - QREps: [C, M, Y, K] // 0-255
209210
*/
210211
protected ?array $moduleValues = null;
211212

tests/Data/QRDataTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use chillerlan\QRCode\Common\MaskPattern;
1515
use chillerlan\QRCode\Data\QRData;
1616
use chillerlan\QRCode\Output\QRGdImage;
17+
use chillerlan\QRCode\Output\QROutputInterface;
1718
use chillerlan\QRCode\QRCode;
1819
use chillerlan\QRCode\QROptions;
1920
use PHPUnit\Framework\TestCase;
@@ -50,6 +51,7 @@ public function testSetBitBuffer():void{
5051
$this::assertSame(3, $matrix->getVersion()->getVersionNumber());
5152

5253
// attempt to read
54+
$options->outputType = QROutputInterface::GDIMAGE_PNG;
5355
$options->outputBase64 = false;
5456
$options->readerUseImagickIfAvailable = false;
5557

0 commit comments

Comments
 (0)