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

UnprocessedType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getType() 0 3 1
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