Completed
Push — master ( 718ef3...30ecae )
by Roman
02:15
created

UnprocessedTypeException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getType() 0 3 1
1
<?php
2
3
namespace kartavik\Collections\Exceptions;
4
5
use Throwable;
6
7
/**
8
 * Class UnprocessedTypeException
9
 * @package kartavik\Collections\Exceptions
10
 */
11
class UnprocessedTypeException extends \InvalidArgumentException
12
{
13
    /** @var string|null */
14
    protected $type;
15
16
    public function __construct(
17
        ?string $type,
18
        string $message = "Type must be declared class",
19
        int $code = -1,
20
        Throwable $previous = null
21
    ) {
22
        $this->type = $type;
23
24
        parent::__construct($message, $code, $previous);
25
    }
26
27
    public function getType(): ?string
28
    {
29
        return $this->type;
30
    }
31
}
32