mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-08-18 12:25:14 +00:00
add support for endroid/qr-code (with logo) version 6 (#143)
This commit is contained in:
@@ -33,11 +33,15 @@ class EndroidQrCodeWithLogoProvider extends EndroidQrCodeProvider
|
||||
|
||||
$logo = null;
|
||||
if ($this->logoPath) {
|
||||
$logo = Logo::create($this->logoPath);
|
||||
if ($this->logoSize) {
|
||||
$logo->setResizeToWidth($this->logoSize[0]);
|
||||
if (isset($this->logoSize[1])) {
|
||||
$logo->setResizeToHeight($this->logoSize[1]);
|
||||
if ($this->endroid6) {
|
||||
$logo = new Logo($this->logoPath, ...$this->logoSize);
|
||||
} else {
|
||||
$logo = Logo::create($this->logoPath);
|
||||
if ($this->logoSize) {
|
||||
$logo->setResizeToWidth($this->logoSize[0]);
|
||||
if (isset($this->logoSize[1])) {
|
||||
$logo->setResizeToHeight($this->logoSize[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user