/**
  * {@inheritdoc}
  */
 public function updateWorklog($worklogId, $timeSpent, \DateTime $dateStarted, $description = null)
 {
     $worklog = $this->loadWorklog($worklogId);
     $timeSpent = $this->timeSpentFactory->createFromString($timeSpent);
     $worklog->update($timeSpent, $dateStarted, $description);
     $this->worklogRepository->save($worklog);
 }
 /**
  * @param Tracker $tracker
  */
 private function processStopTracking(Tracker $tracker)
 {
     $this->trackerRepository->removeTracker($tracker);
     $timeSpent = $this->timeSpentFactory->create($tracker->getSpentSeconds());
     $worklog = $this->worklogFactory->create($timeSpent, $tracker->getDateStarted(), $tracker->getTask(), $tracker->getUser());
     $this->worklogRepository->save($worklog);
 }