Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/AuthenticationResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

class AuthenticationResult
{
protected const FAILURE = 0;
protected const SUCCESS = 1;
protected const FAILURE_INVALID_CREDENTIALS = -1;
protected const FAILURE_IDENTITY_AMBIGUOUS = -2;
protected const FAILURE_IDENTITY_NOT_FOUND = -3;
protected const FAILURE_UNCATEGORIZED = -4;
protected const FAILURE_MISSING_CREDENTIALS = -5;
public const FAILURE = 0;
public const SUCCESS = 1;
public const FAILURE_INVALID_CREDENTIALS = -1;
public const FAILURE_IDENTITY_AMBIGUOUS = -2;
public const FAILURE_IDENTITY_NOT_FOUND = -3;
public const FAILURE_UNCATEGORIZED = -4;
public const FAILURE_MISSING_CREDENTIALS = -5;

protected int $code;

protected IdentityInterface $identity;
protected ?IdentityInterface $identity = null;

protected string $message = '';

Expand Down
10 changes: 5 additions & 5 deletions test/AuthenticationResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
class AuthenticationResultTest extends TestCase
{
protected AuthenticationResult $subject;
protected IdentityInterface|MockObject $indentyInterfaceMock;
protected IdentityInterface|MockObject $identityInterfaceMock;

/**
* @throws Exception
*/
protected function setUp(): void
{
$this->indentyInterfaceMock = $this->createMock(IdentityInterface::class);
$this->indentyInterfaceMock->method('getId')->will($this->returnValue(10));
$this->indentyInterfaceMock->method('getName')->willReturn('username');
$this->subject = new AuthenticationResult(2, 'valid', $this->indentyInterfaceMock);
$this->identityInterfaceMock = $this->createMock(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->will($this->returnValue(10));
$this->identityInterfaceMock->method('getName')->willReturn('username');
$this->subject = new AuthenticationResult(2, 'valid', $this->identityInterfaceMock);
}

public function testAuth()
Expand Down