rounding = $rounding; } public function canEditBegin(): bool { return true; } public function canEditEnd(): bool { return true; } public function canEditDuration(): bool { return false; } public function canUpdateTimesWithAPI(): bool { return true; } public function getId(): string { return 'default'; } public function canSeeBeginAndEndTimes(): bool { return true; } public function create(Timesheet $timesheet, ?Request $request = null): void { parent::create($timesheet, $request); if (null === $timesheet->getBegin()) { $timesheet->setBegin($this->dateTime->createDateTime()); } $this->rounding->roundBegin($timesheet); if (null !== $timesheet->getEnd()) { $this->rounding->roundEnd($timesheet); if (null !== $timesheet->getDuration()) { $this->rounding->roundDuration($timesheet); } } } }