Skip to content

Commit

Permalink
Create individual setters
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Aug 21, 2018
1 parent 151db79 commit bff7b8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]);
$qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]);
$qrCode->setLabel('Scan the code', 16, __DIR__.'/../assets/fonts/noto_sans.otf', LabelAlignment::CENTER);
$qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png');
$qrCode->setLogoWidth(150);
$qrCode->setLogoSize(150, 200);
$qrCode->setRoundBlockSize(true);
$qrCode->setValidateResult(false);
$qrCode->setWriterOptions(['exclude_xml_declaration' => true]);
Expand Down
10 changes: 5 additions & 5 deletions src/QrCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,8 @@ public function setLogoSize(int $logoWidth, int $logoHeight = null): void
$this->logoHeight = $logoHeight;
}

/**
* @deprecated
*/
public function setLogoWidth(int $logoWidth): void
{
trigger_error('Method ' . __METHOD__ . ' is deprecated: use setLogoSize', E_USER_DEPRECATED);

$this->logoWidth = $logoWidth;
}

Expand All @@ -193,6 +188,11 @@ public function getLogoWidth(): ?int
return $this->logoWidth;
}

public function setLogoHeight(int $logoHeight): void
{
$this->logoHeight = $logoHeight;
}

public function getLogoHeight(): ?int
{
return $this->logoHeight;
Expand Down

0 comments on commit bff7b8c

Please sign in to comment.