Passed
Push — master ( 30ecae...ce9923 )
by Roman
01:45
created

UnprocessedType::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace kartavik\Collections\Exception;
4
5
/**
6
 * Class UnprocessedTypeException
7
 * @package kartavik\Collections\Exceptions
8
 */
9
class UnprocessedType extends \InvalidArgumentException
10
{
11
    /** @var string|null */
12
    protected $type;
13
14
    public function __construct(
15
        ?string $type,
16
        int $code = -1,
17
        \Throwable $previous = null
18
    ) {
19
        $this->type = $type;
20
21
        parent::__construct("Type must be declared class", $code, $previous);
22
    }
23
24
    public function getType(): ?string
25
    {
26
        return $this->type;
27
    }
28
}
29