Skip to content

Commit

Permalink
adjusted code based on style diff
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschriever authored and JeroenBoersma committed Mar 20, 2024
1 parent 8d9021f commit 1b16d85
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Model/GoogleAuthenticatorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
namespace Elgentos\Frontend2FA\Model;

use Endroid\QrCode\Color\Color;
use Endroid\QrCode\QrCode;
use Endroid\QrCode\Writer\PngWriter;
use Endroid\QrCode\Encoding\Encoding;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelLow;
use Endroid\QrCode\QrCode;
use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin;
use Endroid\QrCode\Writer\PngWriter;

class GoogleAuthenticatorService extends \Neyamtux\Authenticator\Lib\PHPGangsta\GoogleAuthenticator
{
Expand All @@ -27,9 +27,7 @@ public function getQrCodeEndroid(
$title = null,
$params = []
) {
$size = !empty($params['size']) && (int)$params['size'] > 0 ? (int)$params['size'] : 200;
$level = !empty($params['level']) && array_search($params['level'],
['L', 'M', 'Q', 'H']) !== false ? $params['level'] : 'M';
$size = !empty($params['size']) && (int) $params['size'] > 0 ? (int) $params['size'] : 200;

$text = sprintf('otpauth://totp/%s?secret=%s', $name, $secret);
if (true === is_string($title)) {
Expand Down

0 comments on commit 1b16d85

Please sign in to comment.