| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function getFormatter($dateFormat) |
||
| 17 | { |
||
| 18 | switch (strtolower($dateFormat)) { |
||
| 19 | case DateFormat::DATE_FORMAT_DAY_OF_YEAR: |
||
| 20 | $class = DateFormatterDayOfYear::class; |
||
| 21 | break; |
||
| 22 | |||
| 23 | case DateFormat::DATE_FORMAT_DAY_OF_YEAR_FIXED_LENGTH: |
||
| 24 | $class = DateFormatterDayOfYearFixedLength::class; |
||
| 25 | break; |
||
| 26 | |||
| 27 | default: |
||
| 28 | $class = DateFormatterBasic::class; |
||
| 29 | break; |
||
| 30 | } |
||
| 31 | |||
| 32 | return new $class; |
||
| 33 | } |
||
| 34 | } |
||
| 35 |