Skip to content

Commit

Permalink
apply styles
Browse files Browse the repository at this point in the history
  • Loading branch information
2amjsouza committed Oct 17, 2023
1 parent f1766fb commit beea74b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Dto/LogoDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ public function targetHeight()
{
return $this->targetHeight;
}
}
}
7 changes: 6 additions & 1 deletion src/Traits/ImageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ public function writeString(QrCodeInterface $qrCode): string
);

if ($qrCode->getLogoPath()) {
$image = $this->addLogo($image, $qrCode->getLogoPath(), $qrCode->getLogoWidth(), $qrCode->getScaleLogoHeight());
$image = $this->addLogo(
$image,
$qrCode->getLogoPath(),
$qrCode->getLogoWidth(),
$qrCode->getScaleLogoHeight()
);
}

if ($qrCode->getLabel()) {
Expand Down
2 changes: 0 additions & 2 deletions src/Traits/UrlTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ trait UrlTrait
*/
public function setUrl(string $value)
{
$error = null;

if (!filter_var($value, FILTER_VALIDATE_URL)) {
throw new InvalidConfigException('Url seems invalid.');
}
Expand Down
8 changes: 7 additions & 1 deletion src/Writer/SvgWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ public function writeString(QrCodeInterface $qrCode): string
$this->addMargin($svg, $qrCode);

if ($qrCode->getLogoPath()) {
$this->addLogo($svg, $qrCode, $qrCode->getLogoPath(), $qrCode->getLogoWidth(), $qrCode->getScaleLogoHeight());
$this->addLogo(
$svg,
$qrCode,
$qrCode->getLogoPath(),
$qrCode->getLogoWidth(),
$qrCode->getScaleLogoHeight()
);
}

if ($qrCode->getLabel()) {
Expand Down

0 comments on commit beea74b

Please sign in to comment.