Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
27 | 18 | public function __construct($strategyName, HasMany $vacancies, $timezone = null) |
|
28 | { |
||
29 | 18 | switch (strtolower($strategyName)) { |
|
30 | case 'timeslot': |
||
31 | 9 | $this->strategy = new TimeslotCalendar($vacancies, $timezone); |
|
32 | 9 | break; |
|
33 | case 'dateslot': |
||
34 | 8 | $this->strategy = new DateslotCalendar($vacancies, $timezone); |
|
35 | 8 | break; |
|
36 | default: |
||
37 | 1 | throw new StrategyNotRecognizedException(); |
|
38 | } |
||
39 | 17 | } |
|
40 | |||
60 |