mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-24 12:27:55 +00:00
🔥 v6.0 first pass: PHP 8.2, remove deprecated elements, add type hints
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user