Passed
Branch 001-basic (dcea18)
by Mr.
02:13
created

TransformerException::__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\Controller;
6
7
use LibraryCatalog\Exception\AppException;
8
9
class TransformerException extends AppException
10
{
11 4
    public function __construct($message = "", $code = 0, ?\Throwable $previous = null)
12
    {
13 4
        if ($message == '') {
14 1
            $message = 'Can not transform object';
15
        }
16 4
        parent::__construct($message, $code, $previous);
17 4
    }
18
}
19