Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -54,9 +54,7 @@ class TwoFactorController extends Controller
}
/**
* @param Request $request
*
* @return RedirectResponse|Redirector
* @return Redirector|RedirectResponse
*/
public function submitMFA(Request $request)
{
@@ -101,11 +99,6 @@ class TwoFactorController extends Controller
/**
* Each MFA history has a timestamp and a code, saving the MFA entries for 5 minutes. So if the
* submitted MFA code has been submitted in the last 5 minutes, it won't work despite being valid.
*
* @param string $mfaCode
* @param array $mfaHistory
*
* @return bool
*/
private function inMFAHistory(string $mfaCode, array $mfaHistory): bool
{
@@ -143,9 +136,6 @@ class TwoFactorController extends Controller
app('preferences')->set('mfa_history', $newHistory);
}
/**
* @param string $mfaCode
*/
private function addToMFAHistory(string $mfaCode): void
{
/** @var array $mfaHistory */
@@ -162,10 +152,6 @@ class TwoFactorController extends Controller
/**
* Checks if code is in users backup codes.
*
* @param string $mfaCode
*
* @return bool
*/
private function isBackupCode(string $mfaCode): bool
{
@@ -182,8 +168,6 @@ class TwoFactorController extends Controller
/**
* Remove the used code from the list of backup codes.
*
* @param string $mfaCode
*/
private function removeFromBackupCodes(string $mfaCode): void
{