| Conditions | 7 |
| Paths | 19 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 1 | public function parseDateRange(ArrayList $dateParts, DateTime $from, DateTime $to, $delimiter) |
|
| 29 | { |
||
| 30 | 1 | $ret = ""; |
|
| 31 | 1 | foreach ($dateParts as $key => $datePart) { |
|
| 32 | 1 | if (strpos($key, "year") !== false) { |
|
| 33 | 1 | $ret .= $this->renderOneRangePart($datePart, $from, $to, $delimiter); |
|
| 34 | } |
||
| 35 | 1 | if (strpos($key, "month") !== false) { |
|
| 36 | 1 | $day = !empty($d = $from->getMonth()) ? $d : ""; |
|
| 37 | 1 | $ret .= $day; |
|
| 38 | } |
||
| 39 | 1 | if (strpos($key, "day") !== false) { |
|
| 40 | 1 | $day = !empty($d = $from->getDay()) ? $datePart->render($from, $this->parentDateObject) : ""; |
|
| 41 | 1 | $ret .= $day; |
|
| 42 | } |
||
| 43 | } |
||
| 44 | 1 | return $ret; |
|
| 45 | } |
||
| 47 |