EventStreamDoesNotExistException::fromStreamId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace DDDominio\EventSourcing\EventStore;
4
5
class EventStreamDoesNotExistException extends \Exception
6
{
7
    /**
8
     * @param $streamId
9
     * @param int $code
10
     * @param \Exception|null $previous
11
     * @return EventStreamDoesNotExistException
12
     */
13 6
    public static function fromStreamId($streamId, $code = 0, \Exception $previous = null)
14
    {
15 6
        return new self(
16 6
            sprintf('The stream of id %s does not exist', $streamId),
17
            $code,
18
            $previous
19
        );
20
    }
21
}
22