AuthenticationFailed::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 3
dl 0
loc 6
ccs 0
cts 6
cp 0
crap 6
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Service\Middleware\Security\Exception;
6
7
8
use Throwable;
9
use Xervice\Core\Exception\XerviceException;
10
11
class AuthenticationFailed extends XerviceException
12
{
13
    /**
14
     * AuthenticationFailed constructor.
15
     *
16
     * @param string $message
17
     * @param int $code
18
     * @param \Throwable $previous
19
     */
20
    public function __construct(string $message = "", int $code = 0, \Throwable $previous = null)
21
    {
22
        if ($message == '') {
23
            $message = 'Authentication failed';
24
        }
25
        parent::__construct($message, $code, $previous);
26
    }
27
28
}