mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-11-23 03:12:29 +00:00
:octocat: QRMatrix: remove property getters in favor of asymmetric visibility
This commit is contained in:
@@ -44,18 +44,18 @@ class QRStringJSON extends QROutputAbstract{
|
||||
*/
|
||||
public function dump(string|null $file = null):string{
|
||||
[$width, $height] = $this->getOutputDimensions();
|
||||
$version = $this->matrix->getVersion();
|
||||
$version = $this->matrix->version;
|
||||
$dimension = $version->getDimension();
|
||||
|
||||
$json = [
|
||||
'$schema' => $this::SCHEMA,
|
||||
'qrcode' => [
|
||||
'version' => $version->getVersionNumber(),
|
||||
'eccLevel' => (string)$this->matrix->getEccLevel(),
|
||||
'eccLevel' => (string)$this->matrix->eccLevel,
|
||||
'matrix' => [
|
||||
'size' => $dimension,
|
||||
'quietzoneSize' => (int)(($this->moduleCount - $dimension) / 2),
|
||||
'maskPattern' => $this->matrix->getMaskPattern()->getPattern(),
|
||||
'maskPattern' => $this->matrix->maskPattern->getPattern(),
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'rows' => [],
|
||||
@@ -63,7 +63,7 @@ class QRStringJSON extends QROutputAbstract{
|
||||
],
|
||||
];
|
||||
|
||||
foreach($this->matrix->getMatrix() as $y => $row){
|
||||
foreach($this->matrix->matrix as $y => $row){
|
||||
$matrixRow = $this->row($y, $row);
|
||||
|
||||
if($matrixRow !== null){
|
||||
|
||||
Reference in New Issue
Block a user