Skip to content

Commit

Permalink
Set default days for ScheduleItem.php
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Feb 10, 2024
1 parent a8b1b38 commit 193cbc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Classes/ScheduleItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function create(string $name, array $data = [])
$instance = resolve(static::class, ['name' => $name]);
$instance->data = $data;
$instance->type = array_get($data, 'type', '24_7');
$instance->days = array_get($data, 'days') ?: [];
$instance->days = array_get($data, 'days') ?: range(0, 6);
$instance->open = array_get($data, 'open', '00:00');
$instance->close = array_get($data, 'close', '23:59');
$instance->timesheet = $instance->timesheet(array_get($data, 'timesheet', []));
Expand Down

0 comments on commit 193cbc6

Please sign in to comment.