| Conditions | 4 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 1 | public function parseDateRange(ArrayList $dateParts, DateTime $from, DateTime $to, $delimiter) |
|
| 29 | { |
||
| 30 | 1 | $dp = $dateParts->toArray(); |
|
| 31 | 1 | $dateParts_ = []; |
|
| 32 | 1 | array_walk($dp, function($datePart, $key) use (&$dateParts_) { |
|
| 33 | 1 | if (strpos($key, "year") !== false || strpos($key, "month") !== false) { |
|
| 34 | 1 | $dateParts_["yearmonth"][] = $datePart; |
|
| 35 | } |
||
| 36 | 1 | if (strpos($key, "day") !== false) { |
|
| 37 | 1 | $dateParts_["day"] = $datePart; |
|
| 38 | } |
||
| 39 | 1 | }); |
|
| 40 | return $this->renderDateParts($dateParts_, $from, $to, $delimiter); |
||
| 41 | } |
||
| 43 |