Passed
Push — master ( ffee1f...e53f62 )
by Samuel
03:34
created

InvalidCredentialsException::__construct()   A

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 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace App\Domain\Authentication\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