Passed
Branch main (4cb13d)
by Mr.
04:54 queued 02:43
created

HttpUnauthorizedException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 3
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LibraryCatalog\Exception;
6
7
class HttpUnauthorizedException extends AppException
8
{
9 3
    public function __construct($message = "", $code = 0, ?\Throwable $previous = null)
10
    {
11 3
        if ($message == '') {
12 2
            $message = 'Unauthorized';
13
        }
14 3
        parent::__construct($message, $code, $previous);
15 3
    }
16
}
17