InvalidCredentialsException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Module\Authentication\Login\Domain\Exception;
4
5
class InvalidCredentialsException extends AuthenticationException
6
{
7
    // Voluntarily not more information
8
    private string $userEmail;
9
10
    // Invalid credentials asserted in LoginSubmitActionTest
11 2
    public function __construct(string $email, string $message = 'Invalid credentials')
12
    {
13 2
        parent::__construct($message);
14 2
        $this->userEmail = $email;
15
    }
16
17
    /**
18
     * @return string
19
     */
20 2
    public function getUserEmail(): string
21
    {
22 2
        return $this->userEmail;
23
    }
24
}
25