diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 30f52ab..2951687 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -84,8 +84,7 @@ class SettingsController extends Controller { $qrCode = new QrCode(); $secretName = $this->getSecretName(); $issuer = $this->getSecretIssuer(); - $x = "otpauth://totp/$secretName?secret=$secret&issuer=$issuer"; - $qr = $qrCode->setText($x) + $qr = $qrCode->setText("otpauth://totp/$secretName?secret=$secret&issuer=$issuer") ->setSize(150) ->getDataUri(); return [ diff --git a/tests/unit/Controller/SettingsControllerTest.php b/tests/unit/Controller/SettingsControllerTest.php index ce668be..1536408 100644 --- a/tests/unit/Controller/SettingsControllerTest.php +++ b/tests/unit/Controller/SettingsControllerTest.php @@ -85,8 +85,7 @@ class SettingsControllerTest extends TestCase { $qrCode = new QrCode(); $issuer = rawurlencode('https://instance.com (' . $this->defaults->getName() . ')'); - $x = "otpauth://totp/user%40instance.com?secret=newsecret&issuer=$issuer"; - $qr = $qrCode->setText($x) + $qr = $qrCode->setText("otpauth://totp/user%40instance.com?secret=newsecret&issuer=$issuer") ->setSize(150) ->getDataUri();