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