|
@@ -175,7 +175,7 @@ class QRMatrix{
|
|
|
*
|
|
*
|
|
|
* @return int[][]|bool[][]
|
|
* @return int[][]|bool[][]
|
|
|
*/
|
|
*/
|
|
|
- public function getMatrix(bool $boolean = null):array{
|
|
|
|
|
|
|
+ public function getMatrix(?bool $boolean = null):array{
|
|
|
|
|
|
|
|
if($boolean !== true){
|
|
if($boolean !== true){
|
|
|
return $this->matrix;
|
|
return $this->matrix;
|
|
@@ -195,7 +195,7 @@ class QRMatrix{
|
|
|
* @see \chillerlan\QRCode\Data\QRMatrix::getMatrix()
|
|
* @see \chillerlan\QRCode\Data\QRMatrix::getMatrix()
|
|
|
* @codeCoverageIgnore
|
|
* @codeCoverageIgnore
|
|
|
*/
|
|
*/
|
|
|
- public function matrix(bool $boolean = null):array{
|
|
|
|
|
|
|
+ public function matrix(?bool $boolean = null):array{
|
|
|
return $this->getMatrix($boolean);
|
|
return $this->getMatrix($boolean);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -387,7 +387,7 @@ class QRMatrix{
|
|
|
* 7 # 3
|
|
* 7 # 3
|
|
|
* 6 5 4
|
|
* 6 5 4
|
|
|
*/
|
|
*/
|
|
|
- public function checkNeighbours(int $x, int $y, int $M_TYPE = null):int{
|
|
|
|
|
|
|
+ public function checkNeighbours(int $x, int $y, ?int $M_TYPE = null):int{
|
|
|
$bits = 0;
|
|
$bits = 0;
|
|
|
|
|
|
|
|
foreach($this::neighbours as $bit => [$ix, $iy]){
|
|
foreach($this::neighbours as $bit => [$ix, $iy]){
|
|
@@ -552,7 +552,7 @@ class QRMatrix{
|
|
|
*
|
|
*
|
|
|
* ISO/IEC 18004:2000 Section 8.9
|
|
* ISO/IEC 18004:2000 Section 8.9
|
|
|
*/
|
|
*/
|
|
|
- public function setFormatInfo(MaskPattern $maskPattern = null):self{
|
|
|
|
|
|
|
+ public function setFormatInfo(?MaskPattern $maskPattern = null):self{
|
|
|
$this->maskPattern = $maskPattern;
|
|
$this->maskPattern = $maskPattern;
|
|
|
$bits = 0; // sets all format fields to false (test mode)
|
|
$bits = 0; // sets all format fields to false (test mode)
|
|
|
|
|
|
|
@@ -678,7 +678,7 @@ class QRMatrix{
|
|
|
*
|
|
*
|
|
|
* @throws \chillerlan\QRCode\Data\QRCodeDataException
|
|
* @throws \chillerlan\QRCode\Data\QRCodeDataException
|
|
|
*/
|
|
*/
|
|
|
- public function setLogoSpace(int $width, int $height = null, int $startX = null, int $startY = null):self{
|
|
|
|
|
|
|
+ public function setLogoSpace(int $width, ?int $height = null, ?int $startX = null, ?int $startY = null):self{
|
|
|
$height ??= $width;
|
|
$height ??= $width;
|
|
|
|
|
|
|
|
// if width and height happen to be negative or 0 (default value), just return - nothing to do
|
|
// if width and height happen to be negative or 0 (default value), just return - nothing to do
|