smiley il y a 2 ans
Parent
commit
c24f0c9fd5
4 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 1 0
      src/Data/QRMatrix.php
  2. 1 0
      src/Decoder/Binarizer.php
  3. 1 1
      src/Detector/PerspectiveTransform.php
  4. 2 0
      src/QRCode.php

+ 1 - 0
src/Data/QRMatrix.php

@@ -579,6 +579,7 @@ class QRMatrix{
 
 
 		// clear the space
 		// clear the space
 		foreach($this->matrix as $y => $row){
 		foreach($this->matrix as $y => $row){
+			/** @SuppressWarnings(PHPMD.UnusedLocalVariable) */
 			foreach($row as $x => $val){
 			foreach($row as $x => $val){
 				// out of bounds, skip
 				// out of bounds, skip
 				if($x < $start || $y < $start ||$x >= $end || $y >= $end){
 				if($x < $start || $y < $start ||$x >= $end || $y >= $end){

+ 1 - 0
src/Decoder/Binarizer.php

@@ -206,6 +206,7 @@ final class Binarizer{
 	private function calculateBlackPoints(int $subWidth, int $subHeight, int $width, int $height):array{
 	private function calculateBlackPoints(int $subWidth, int $subHeight, int $width, int $height):array{
 		$blackPoints = array_fill(0, $subHeight, 0);
 		$blackPoints = array_fill(0, $subHeight, 0);
 
 
+		/** @SuppressWarnings(PHPMD.UnusedLocalVariable) */
 		foreach($blackPoints as $key => $point){
 		foreach($blackPoints as $key => $point){
 			$blackPoints[$key] = array_fill(0, $subWidth, 0);
 			$blackPoints[$key] = array_fill(0, $subWidth, 0);
 		}
 		}

+ 1 - 1
src/Detector/PerspectiveTransform.php

@@ -54,7 +54,7 @@ final class PerspectiveTransform{
 	}
 	}
 
 
 	/**
 	/**
-	 *
+	 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
 	 */
 	 */
 	public function quadrilateralToQuadrilateral(
 	public function quadrilateralToQuadrilateral(
 		float $x0, float $y0, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3,
 		float $x0, float $y0, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3,

+ 2 - 0
src/QRCode.php

@@ -6,6 +6,8 @@
  * @author       Smiley <smiley@chillerlan.net>
  * @author       Smiley <smiley@chillerlan.net>
  * @copyright    2015 Smiley
  * @copyright    2015 Smiley
  * @license      MIT
  * @license      MIT
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
  */
 
 
 namespace chillerlan\QRCode;
 namespace chillerlan\QRCode;