mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 12:07:32 +00:00
:octocat: ECICharset::$charsetID: remove property getter in favor of asymmetric visibility
This commit is contained in:
@@ -92,7 +92,7 @@ final class ECICharset{
|
||||
/**
|
||||
* The current ECI character set ID
|
||||
*/
|
||||
private int $charsetID;
|
||||
private(set) int $charsetID;
|
||||
|
||||
/**
|
||||
* @throws \chillerlan\QRCode\QRCodeException
|
||||
@@ -106,13 +106,6 @@ final class ECICharset{
|
||||
$this->charsetID = $charsetID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current character set ID
|
||||
*/
|
||||
public function getID():int{
|
||||
return $this->charsetID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the current character set or null if no name is available
|
||||
*
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ class QRCode{
|
||||
}
|
||||
|
||||
return $this
|
||||
->addEciDesignator($eciCharset->getID())
|
||||
->addEciDesignator($eciCharset->charsetID)
|
||||
->addByteSegment($data)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ final class ECICharsetTest extends TestCase{
|
||||
public function getName(int $id, string|null $name = null):void{
|
||||
$eciCharset = new ECICharset($id);
|
||||
|
||||
$this::assertSame($id, $eciCharset->getID());
|
||||
$this::assertSame($id, $eciCharset->charsetID);
|
||||
$this::assertSame($name, $eciCharset->getName());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user