NormalizerNotFound::getFormat()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 2
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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