Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 2 | public function resolveName(FileInfo $srcFileInfo) |
|
33 | { |
||
34 | 2 | $dstFileInfo = $this->namingStrategy->provideName($srcFileInfo); |
|
35 | 2 | if (!$dstFileInfo instanceof FileInfo) { |
|
36 | 1 | throw new \RuntimeException( |
|
37 | 1 | sprintf( |
|
38 | 1 | 'Specified naming strategy should return an instance of "%s" class', |
|
39 | '\FileNamingResolver\FileInfo' |
||
40 | 1 | ) |
|
41 | 1 | ); |
|
42 | } |
||
43 | |||
44 | 1 | return $dstFileInfo; |
|
45 | } |
||
46 | |||
67 |