Passed
Push — master ( 82a58b...d35cf8 )
by Tomasz
02:32
created

binaryUuidTransformerMustBeProvided()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace ReadModel;
5
6
class InvalidArgumentException extends \InvalidArgumentException
7
{
8
    public static function filterDoesNotExist(string $name): self
9
    {
10
        return new self("Filter '$name' doesn't exist");
11
    }
12
13
    public static function binaryUuidTransformerMustBeProvided(): self
14
    {
15
        return new self('You have to provide BinaryUuidTransformer to use BinaryUuidTransformerWalker');
16
    }
17
18 1
    public static function invalidType(string $type, string $function): self
19
    {
20 1
        return new self(sprintf(
21 1
            'Type "%s" is invalid. There is no "%s" function. Fix your type or add that function to global namespace',
22 1
            $type,
23 1
            $function
24
        ));
25
    }
26
}
27