mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-24 16:09:14 +01:00
Remove useless method parameter
This commit is contained in:
parent
025cfc5e58
commit
923ff04e3c
@ -312,27 +312,22 @@ private function mapArrayToDto($array) : TwoFAccountDto
|
|||||||
*
|
*
|
||||||
* @param bool $usingUri Whether or not the token should be fed with the account uri
|
* @param bool $usingUri Whether or not the token should be fed with the account uri
|
||||||
*/
|
*/
|
||||||
private function initTokenWithTwoFAccount(TwoFAccount $twofaccount, bool $useLegacyUri = false) : void
|
private function initTokenWithTwoFAccount(TwoFAccount $twofaccount) : void
|
||||||
{
|
{
|
||||||
if ( $useLegacyUri ) {
|
$dto = new TwoFAccountDto();
|
||||||
$this->initTokenWithUri($twofaccount->legacy_uri);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$dto = new TwoFAccountDto();
|
|
||||||
|
|
||||||
$dto->otp_type = $twofaccount->otp_type;
|
$dto->otp_type = $twofaccount->otp_type;
|
||||||
$dto->account = $twofaccount->account;
|
$dto->account = $twofaccount->account;
|
||||||
$dto->service = $twofaccount->service;
|
$dto->service = $twofaccount->service;
|
||||||
$dto->icon = $twofaccount->icon;
|
$dto->icon = $twofaccount->icon;
|
||||||
$dto->secret = $twofaccount->secret;
|
$dto->secret = $twofaccount->secret;
|
||||||
$dto->algorithm = $twofaccount->algorithm;
|
$dto->algorithm = $twofaccount->algorithm;
|
||||||
$dto->digits = $twofaccount->digits;
|
$dto->digits = $twofaccount->digits;
|
||||||
|
|
||||||
if ( $twofaccount->period ) $dto->period = $twofaccount->period;
|
if ( $twofaccount->period ) $dto->period = $twofaccount->period;
|
||||||
if ( $twofaccount->counter ) $dto->counter = $twofaccount->counter;
|
if ( $twofaccount->counter ) $dto->counter = $twofaccount->counter;
|
||||||
|
|
||||||
$this->initTokenWithParameters($dto);
|
$this->initTokenWithParameters($dto);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user