Quellcode durchsuchen

:octocat: QRMatrix: add dummy methods with deprecation notice

smiley vor 2 Jahren
Ursprung
Commit
2c389c7d4c
1 geänderte Dateien mit 45 neuen und 0 gelöschten Zeilen
  1. 45 0
      src/Data/QRMatrix.php

+ 45 - 0
src/Data/QRMatrix.php

@@ -166,6 +166,15 @@ class QRMatrix{
 		return $matrix;
 		return $matrix;
 	}
 	}
 
 
+	/**
+	 * @deprecated 5.0.0 use QRMatrix::getMatrix() instead
+	 * @see \chillerlan\QRCode\Data\QRMatrix::getMatrix()
+	 * @codeCoverageIgnore
+	 */
+	public function matrix(bool $boolean = null):array{
+		return $this->getMatrix($boolean);
+	}
+
 	/**
 	/**
 	 * Returns the current version number
 	 * Returns the current version number
 	 */
 	 */
@@ -173,6 +182,15 @@ class QRMatrix{
 		return $this->version;
 		return $this->version;
 	}
 	}
 
 
+	/**
+	 * @deprecated 5.0.0 use QRMatrix::getVersion() instead
+	 * @see \chillerlan\QRCode\Data\QRMatrix::getVersion()
+	 * @codeCoverageIgnore
+	 */
+	public function version():?Version{
+		return $this->getVersion();
+	}
+
 	/**
 	/**
 	 * Returns the current ECC level
 	 * Returns the current ECC level
 	 */
 	 */
@@ -180,6 +198,15 @@ class QRMatrix{
 		return $this->eccLevel;
 		return $this->eccLevel;
 	}
 	}
 
 
+	/**
+	 * @deprecated 5.0.0 use QRMatrix::getEccLevel() instead
+	 * @see \chillerlan\QRCode\Data\QRMatrix::getEccLevel()
+	 * @codeCoverageIgnore
+	 */
+	public function eccLevel():?EccLevel{
+		return $this->getEccLevel();
+	}
+
 	/**
 	/**
 	 * Returns the current mask pattern
 	 * Returns the current mask pattern
 	 */
 	 */
@@ -187,6 +214,15 @@ class QRMatrix{
 		return $this->maskPattern;
 		return $this->maskPattern;
 	}
 	}
 
 
+	/**
+	 * @deprecated 5.0.0 use QRMatrix::getMaskPattern() instead
+	 * @see \chillerlan\QRCode\Data\QRMatrix::getMaskPattern()
+	 * @codeCoverageIgnore
+	 */
+	public function maskPattern():?MaskPattern{
+		return $this->getMaskPattern();
+	}
+
 	/**
 	/**
 	 * Returns the absoulute size of the matrix, including quiet zone (after setting it).
 	 * Returns the absoulute size of the matrix, including quiet zone (after setting it).
 	 *
 	 *
@@ -196,6 +232,15 @@ class QRMatrix{
 		return $this->moduleCount;
 		return $this->moduleCount;
 	}
 	}
 
 
+	/**
+	 * @deprecated 5.0.0 use QRMatrix::getSize() instead
+	 * @see \chillerlan\QRCode\Data\QRMatrix::getSize()
+	 * @codeCoverageIgnore
+	 */
+	public function size():int{
+		return $this->getSize();
+	}
+
 	/**
 	/**
 	 * Returns the value of the module at position [$x, $y] or -1 if the coordinate is outside the matrix
 	 * Returns the value of the module at position [$x, $y] or -1 if the coordinate is outside the matrix
 	 */
 	 */