Test Failed
Pull Request — master (#6)
by Roman
01:58
created

UnprocessedTypeException::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\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