-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I would also suggest moving totalSeconds
excludeIds
and subEntryIds
into functions:
e.g. for subEntryIds
private Collection $_subEntryIds;
public function init(): void
{
$this->_subEntryIds = collect();
}
protected function getSubEntryIds()
{
return $this->_subEntryIds->toArray();
}
protected function trackSubEntry(int|array|Collection $id): void
{
$this->getSubEntryIds()->merge(collect($id));
}
then you'd just do:
$this->trackSubEntry($id);