🔥 v6.0 first pass: PHP 8.2, remove deprecated elements, add type hints

This commit is contained in:
smiley
2023-11-25 12:49:56 +01:00
parent a301af5b7f
commit 39e3dfe83b
80 changed files with 332 additions and 1029 deletions
+6 -6
View File
@@ -80,7 +80,7 @@ final class BitMatrix extends QRMatrix{
/**
* Resets the current version info in order to attempt another reading
*/
public function resetVersionInfo():self{
public function resetVersionInfo():static{
$this->version = null;
$this->eccLevel = null;
$this->maskPattern = null;
@@ -91,7 +91,7 @@ final class BitMatrix extends QRMatrix{
/**
* Mirror the bit matrix diagonally in order to attempt a second reading.
*/
public function mirrorDiagonal():self{
public function mirrorDiagonal():static{
$this->mirror = !$this->mirror;
// mirror vertically
@@ -179,7 +179,7 @@ final class BitMatrix extends QRMatrix{
*
* @throws \chillerlan\QRCode\Decoder\QRCodeDecoderException
*/
private function readFormatInformation():self{
private function readFormatInformation():static{
if($this->eccLevel !== null && $this->maskPattern !== null){
return $this;
@@ -296,7 +296,7 @@ final class BitMatrix extends QRMatrix{
* @throws \chillerlan\QRCode\Decoder\QRCodeDecoderException
* @noinspection DuplicatedCode
*/
private function readVersion():self{
private function readVersion():static{
if($this->version !== null){
return $this;
@@ -415,7 +415,7 @@ final class BitMatrix extends QRMatrix{
* @codeCoverageIgnore
* @throws \chillerlan\QRCode\Data\QRCodeDataException
*/
public function setQuietZone(int $quietZoneSize = null):self{
public function setQuietZone(int $quietZoneSize = null):static{
throw new QRCodeDataException('not supported');
}
@@ -423,7 +423,7 @@ final class BitMatrix extends QRMatrix{
* @codeCoverageIgnore
* @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):static{
throw new QRCodeDataException('not supported');
}