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