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

InvalidCredentialsException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
eloc 5
c 2
b 1
f 0
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUserEmail() 0 3 1
A __construct() 0 4 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