Skip to content

Commit

Permalink
rename new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Sep 16, 2024
1 parent 41b713a commit 30710c2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/profilereview/src/Auth/Process/ProfileReview.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function process(array &$state): void
$isHeadedToProfileUrl = self::isHeadedToProfileUrl($state, $this->profileUrl);

$mfa = $this->getAttributeAllValues('mfa', $state);
$method = $this->getAllMethods($state);
$method = $this->getMethod($state);
$profileReview = $this->getAttribute('profile_review', $state);

if (!$isHeadedToProfileUrl) {
Expand Down Expand Up @@ -267,8 +267,8 @@ public function process(array &$state): void
*/
protected function redirectToProfileReview(array &$state, string $employeeId): void
{
$mfaOptions = $this->getAllMfasExceptManager($state);
$methodOptions = $this->getAllMethods($state)['options'];
$mfaOptions = $this->getAllMfaOptionsExceptManager($state);
$methodOptions = $this->getMethod($state)['options'];

if (count($mfaOptions) == 0 && count($methodOptions) == 0) {
return;
Expand All @@ -286,8 +286,8 @@ protected function redirectToProfileReview(array &$state, string $employeeId): v
*/
protected function redirectToNag(array &$state, string $employeeId, string $template): void
{
$mfaOptions = $this->getAllMfasExceptManager($state);
$methodOptions = $this->getAllMethods($state)['options'];
$mfaOptions = $this->getAllMfaOptionsExceptManager($state);
$methodOptions = $this->getMethod($state)['options'];

/* Save state and redirect. */
$state['employeeId'] = $employeeId;
Expand All @@ -304,12 +304,12 @@ protected function redirectToNag(array &$state, string $employeeId, string $temp
$httpUtils->redirectTrustedURL($url, array('StateId' => $stateId));
}

public function getAllMethods(array $state): ?array
public function getMethod(array $state): ?array
{
return $this->getAttributeAllValues('method', $state);
}

protected function getAllMfasExceptManager(array $state): array
protected function getAllMfaOptionsExceptManager(array $state): array
{
$mfaOptions = $this->getAttributeAllValues('mfa', $state)['options'];
foreach ($mfaOptions as $key => $mfaOption) {
Expand Down

0 comments on commit 30710c2

Please sign in to comment.