:octocat: ECICharset::$charsetID: remove property getter in favor of asymmetric visibility

This commit is contained in:
smiley
2026-03-18 02:42:12 +01:00
parent a86ce60bd3
commit 25048d5a0c
3 changed files with 3 additions and 10 deletions
+1 -8
View File
@@ -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
View File
@@ -272,7 +272,7 @@ class QRCode{
}
return $this
->addEciDesignator($eciCharset->getID())
->addEciDesignator($eciCharset->charsetID)
->addByteSegment($data)
;
}
+1 -1
View File
@@ -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());
}