Completed
Pull Request — master (#4)
by Nicolas
02:09
created

EntityIdentifiedNotFoundException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 5
cp 0
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Smart\EtlBundle\Exception\Extractor;
4
5
/**
6
 * Exception thrown when the entity is not found by his identifier
7
 *
8
 * @author Mathieu Ducrot <[email protected]>
9
 */
10
class EntityIdentifiedNotFoundException extends ExtractException
11
{
12
    /**
13
     * @param string $identifier
14
     *
15
     * @return EntityIdentifiedNotFoundException
16
     */
17
    public static function create($identifier)
18
    {
19
        return new self(
20
            sprintf(
21
                'Entity identifed by ' . $identifier . ' not found',
22
                $identifier
23
            )
24
        );
25
    }
26
}
27