Completed
Pull Request — master (#21)
by Hannes
09:11
created

FailingIdFactory::createId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace byrokrat\id;
6
7
/**
8
 * Id factory that always fails
9
 */
10
class FailingIdFactory implements IdFactoryInterface
11
{
12
    public function createId(string $raw): IdInterface
13
    {
14
        throw new Exception\UnableToCreateIdException("Unable to create ID for number '{$raw}'");
15
    }
16
}
17