:octocat: LuminanceSourceInterface: remove property getters in favor of asymmetric visibility

This commit is contained in:
smiley
2026-03-18 02:32:53 +01:00
parent e151e0915e
commit 3f858d71bd
3 changed files with 29 additions and 39 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ final class Binarizer{
public function __construct(LuminanceSourceInterface $source){
$this->source = $source;
$this->luminances = $this->source->getLuminances();
$this->luminances = $this->source->luminances;
}
/**
@@ -137,8 +137,8 @@ final class Binarizer{
* @return \chillerlan\QRCode\Decoder\BitMatrix The 2D array of bits for the image (true means black).
*/
public function getBlackMatrix():BitMatrix{
$width = $this->source->getWidth();
$height = $this->source->getHeight();
$width = $this->source->width;
$height = $this->source->height;
if($width >= self::MINIMUM_DIMENSION && $height >= self::MINIMUM_DIMENSION){
$subWidth = ($width >> self::BLOCK_SIZE_POWER);