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 TaskEntryMarkedAsFailed $event
  */
 protected function whenTaskEntryMarkedAsFailed(TaskEntryMarkedAsFailed $event)
 {
     $taskListEntry = $this->taskList->getTaskListEntryAtPosition($event->taskListPosition());
     $taskListEntry->markAsFailed($event->createdAt());
 }