Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.2109 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 1 | public function provideName(FileInfo $srcFileInfo) |
|
29 | { |
||
30 | 1 | $func = $this->callback; |
|
31 | |||
32 | 1 | $dstFileInfo = $func($srcFileInfo); |
|
33 | 1 | if (!$dstFileInfo instanceof FileInfo) { |
|
34 | throw new \RuntimeException( |
||
35 | sprintf('Callback naming strategy should return an instance of FileNamingResolver\FileInfo class') |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | 1 | return $dstFileInfo; |
|
40 | } |
||
41 | |||
50 |