Completed
Push — master ( 996d38...41ff08 )
by SignpostMarv
01:59
created

DatabaseConnectionNotSpecifiedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
ccs 11
cts 11
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
1
<?php
2
/**
3
* Base daft objects.
4
*
5
* @author SignpostMarv
6
*/
7
declare(strict_types=1);
8
9
namespace SignpostMarv\DaftObject;
10
11
use Throwable;
12
13
class DatabaseConnectionNotSpecifiedException extends DaftObjectRepositoryTypeException
14
{
15 1
    public function __construct(
16
        int $argumentNumber,
17
        string $className,
18
        string $method,
19
        string $expectedType,
20
        string $receivedType,
21
        int $code = 0,
22
        Throwable $previous = null
23
    ) {
24 1
        parent::__construct(
25 1
            sprintf(
26 1
                'Argument %s passed to %s::%s() must be an implementation of %s, %s given.',
27 1
                $argumentNumber,
28 1
                $className,
29 1
                $method,
30 1
                $expectedType,
31 1
                $receivedType
32
            ),
33 1
            $code,
34 1
            $previous
35
        );
36 1
    }
37
}
38