Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
9 | 4 | public function createFileNamingStrategy($strategyName) |
|
10 | { |
||
11 | switch($strategyName) { |
||
12 | 4 | case 'by_tags': |
|
13 | 2 | return new ByTagsFileNamingStrategy(); |
|
14 | 2 | case 'by_scenario_name': |
|
15 | 1 | return new ByScenarioNameFileNamingStrategy(); |
|
16 | 1 | default: |
|
17 | 1 | throw new UnexpectedValueException(sprintf('No strategy for `s', $strategyName)); |
|
18 | 1 | } |
|
19 | } |
||
20 | } |
||
21 |