| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | private function buildDateArray() |
||
| 23 | { |
||
| 24 | $array = []; |
||
| 25 | $storeDate = $date = $this->getStartDate($this->duty->cycle); |
||
| 26 | |||
| 27 | $count = $this->duty->has_groups ? $this->duty->groups()->get()->count() : $this->duty->users()->active()->get()->count(); |
||
| 28 | |||
| 29 | for ($i = 0; $i < $count; $i++) { |
||
| 30 | $array[$i] = $storeDate->format('Y-m-d'); |
||
| 31 | $storeDate = $this->nextDate($this->duty->cycle, $date); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $array; |
||
| 35 | } |
||
| 36 | |||
| 59 |