NormalizerNotFound   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 55.56%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 19
ccs 5
cts 9
cp 0.5556
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFormat() 0 2 1
A getType() 0 2 1
1
<?php
2
/**
3
 * @copyright  Daniel Król <[email protected]>
4
 * @license MIT
5
 * @package Mleko\Alchemist
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
declare(strict_types=1);
11
12
namespace Mleko\Alchemist\Exception;
13
14
15
use Mleko\Alchemist\Type;
16
17
class NormalizerNotFound extends \RuntimeException
18
{
19
    /** @var Type */
20
    private $type;
21
    /** @var string */
22
    private $format;
23
24 2
    public function __construct(Type $type, string $format) {
25 2
        $this->type = $type;
26 2
        $this->format = $format;
27 2
        parent::__construct(sprintf("Not found normalizer for type %s, format %s", $type, $format));
28 2
    }
29
30
    public function getType(): Type {
31
        return $this->type;
32
    }
33
34
    public function getFormat(): string {
35
        return $this->format;
36
    }
37
}
38