smiley 2 năm trước cách đây
mục cha
commit
b0fc9aeb53

+ 1 - 0
src/Output/QRGdImage.php

@@ -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 - 0
src/Output/QRMarkup.php

@@ -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 - 0
src/Output/QRMarkupSVG.php

@@ -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
src/QRCode.php

@@ -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 - 0
tests/Data/QRMatrixTest.php

@@ -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
tests/Output/QROutputTestAbstract.php

@@ -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;