InvalidTypeException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
declare(strict_types=1);
3
4
namespace Anfischer\Dto\Exceptions;
5
6
class InvalidTypeException extends DtoException
7
{
8
    /**
9
     * @param string $class
10
     * @param string $property
11
     * @param string $expected
12
     * @param string $given
13
     */
14
    public function __construct(string $class, string $property, string $expected, string $given)
15
    {
16
        parent::__construct("${class}::${property} must be of type '${expected}' (type '${given}' given)");
17
    }
18
}
19