This commit is contained in:
smiley
2023-04-04 20:29:57 +02:00
parent 50179a97ef
commit b0fc9aeb53
6 changed files with 13 additions and 4 deletions
+1
View File
@@ -167,6 +167,7 @@ class QRGdImage extends QROutputAbstract{
}
// set transparency after scaling, otherwise it would be undone
// @see https://www.php.net/manual/en/function.imagecolortransparent.php#77099
$this->setTransparencyColor();
if($this->options->returnResource){
+2
View File
@@ -21,6 +21,8 @@ abstract class QRMarkup extends QROutputAbstract{
* note: we're not necessarily validating the several values, just checking the general syntax
* note: css4 colors are not included
*
* @todo: XSS proof
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
* @inheritDoc
*/
+2
View File
@@ -24,6 +24,8 @@ use function array_chunk, implode, is_string, preg_match, sprintf, trim;
class QRMarkupSVG extends QRMarkup{
/**
* @todo: XSS proof
*
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill
* @inheritDoc
*/
+4 -2
View File
@@ -25,10 +25,10 @@ use function class_exists, class_implements, in_array, mb_convert_encoding, mb_i
* Turns a text string into a Model 2 QR Code
*
* @see https://github.com/kazuhikoarase/qrcode-generator/tree/master/php
* @see http://www.qrcode.com/en/codes/model12.html
* @see https://www.qrcode.com/en/codes/model12.html
* @see https://www.swisseduc.ch/informatik/theoretische_informatik/qr_codes/docs/qr_standard.pdf
* @see https://en.wikipedia.org/wiki/QR_code
* @see http://www.thonky.com/qr-code-tutorial/
* @see https://www.thonky.com/qr-code-tutorial/
*/
class QRCode{
@@ -179,6 +179,8 @@ class QRCode{
/**
* QRCode constructor.
*
* PHP8: accept iterable
*/
public function __construct(SettingsContainerInterface $options = null){
$this->setOptions(($options ?? new QROptions));
+2
View File
@@ -234,6 +234,7 @@ final class QRMatrixTest extends TestCase{
$version = $matrix->getVersion();
if($version->getVersionNumber() === 1){
/** @noinspection PhpUnitTestFailedLineInspection */
$this::markTestSkipped('N/A (Version 1 has no alignment pattern)');
}
@@ -294,6 +295,7 @@ final class QRMatrixTest extends TestCase{
public function testSetVersionNumber(QRMatrix $matrix):void{
if($matrix->getVersion()->getVersionNumber() < 7){
/** @noinspection PhpUnitTestFailedLineInspection */
$this::markTestSkipped('N/A (Version < 7)');
}
+2 -2
View File
@@ -10,9 +10,9 @@
namespace chillerlan\QRCodeTest\Output;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use chillerlan\QRCode\Common\MaskPattern;
use chillerlan\QRCode\Data\{Byte, QRData, QRMatrix};
use chillerlan\QRCode\Data\QRMatrix;
use chillerlan\QRCode\Output\{QRCodeOutputException, QROutputInterface};
use PHPUnit\Framework\TestCase;