Skip to content

Commit 1a0208a

Browse files
committed
:octocat: simplify logo space determination
1 parent 941b979 commit 1a0208a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/QRCode.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,9 @@ public function getQRMatrix():QRMatrix{
121121
protected function addMatrixModifications(QRMatrix $matrix):QRMatrix{
122122

123123
if($this->options->addLogoSpace){
124-
$logoSpaceWidth = $this->options->logoSpaceWidth;
125-
$logoSpaceHeight = $this->options->logoSpaceHeight;
126-
127124
// check whether one of the dimensions was omitted
128-
if($logoSpaceWidth === null || $logoSpaceHeight === null){
129-
$logoSpaceWidth = ($logoSpaceWidth ?? $logoSpaceHeight ?? 0);
130-
$logoSpaceHeight = null;
131-
}
125+
$logoSpaceWidth = ($this->options->logoSpaceWidth ?? $this->options->logoSpaceHeight ?? 0);
126+
$logoSpaceHeight = ($this->options->logoSpaceHeight ?? $logoSpaceWidth);
132127

133128
$matrix->setLogoSpace(
134129
$logoSpaceWidth,

0 commit comments

Comments
 (0)