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