UnprocessedType   A
last analyzed

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\Support\Exception;
4
5
use kartavik\Support\Exception;
6
7
/**
8
 * Class UnprocessedTypeException
9
 * @package kartavik\Support\Exceptions
10
 */
11
class UnprocessedType extends \InvalidArgumentException implements Exception
12
{
13
    /** @var string|null */
14
    protected $type;
15
16
    public function __construct(
17
        ?string $type,
18
        int $code = -1,
19
        \Throwable $previous = null
20
    ) {
21
        $this->type = $type;
22
23
        parent::__construct("Given type is: " . $type ?? 'null', $code, $previous);
24
    }
25
26
    public function getType(): ?string
27
    {
28
        return $this->type;
29
    }
30
}
31