Ejemplo n.º 1
0
 /**
  * @param TaskListEntry $taskListEntry
  */
 private function checkFinished(TaskListEntry $taskListEntry)
 {
     if ($this->processingCollection) {
         return;
     }
     if ($this->performedTasks == $this->performedSuccessful + $this->performedWithError) {
         if ($this->performedWithError > 0) {
             $this->recordThat(TaskEntryMarkedAsFailed::at($taskListEntry->taskListPosition()));
         } else {
             $this->recordThat(TaskEntryMarkedAsDone::at($taskListEntry->taskListPosition()));
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * @param TaskEntryMarkedAsDone $event
  */
 protected function whenTaskEntryMarkedAsDone(TaskEntryMarkedAsDone $event)
 {
     $taskListEntry = $this->taskList->getTaskListEntryAtPosition($event->taskListPosition());
     $taskListEntry->markAsSuccessfulDone($event->createdAt());
 }