| Conditions | 2 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 2 | public function getText() |
|
| 17 | { |
||
| 18 | try { |
||
| 19 | 2 | $dateFormat = $this->getDateFormat(); |
|
| 20 | |||
| 21 | 2 | $dateFormatter = DateFormatterFactory::getFormatter($dateFormat); |
|
| 22 | |||
| 23 | 2 | return $dateFormatter->format( |
|
| 24 | 2 | $this->getDateTime(), |
|
| 25 | $dateFormat |
||
| 26 | ); |
||
| 27 | } catch (\Exception $e) { |
||
| 28 | throw new UnsupportedDateFormatException($this->getDateFormat()); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 47 |