Skip to content

Commit

Permalink
Merge pull request #1995 from LibreSign/backport/1994/stable28
Browse files Browse the repository at this point in the history
[stable28] Make the method name more clear
  • Loading branch information
vitormattos authored Dec 11, 2023
2 parents 65c2d45 + 8ff4e10 commit cdeb0f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/IdentifyMethod/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function validateToRequest(): void {
}

public function validateToSign(?IUser $user = null): void {
$this->requireAuthenticatedUser($user);
$this->throwIfNotAuthenticated($user);
if ($this->entity->getIdentifierKey() === 'account') {
$this->validateWithAccount($user);
} elseif ($this->entity->getIdentifierKey() === 'email') {
Expand Down Expand Up @@ -187,7 +187,7 @@ private function canCreateAccount(): void {
}
}

private function requireAuthenticatedUser(?IUser $user = null): void {
private function throwIfNotAuthenticated(?IUser $user = null): void {
if (!$user instanceof IUser) {
$signRequest = $this->signRequestMapper->getById($this->getEntity()->getSignRequestId());
throw new LibresignException(json_encode([
Expand Down

0 comments on commit cdeb0f2

Please sign in to comment.