/** * @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())); } } }
/** * @param TaskEntryMarkedAsDone $event */ protected function whenTaskEntryMarkedAsDone(TaskEntryMarkedAsDone $event) { $taskListEntry = $this->taskList->getTaskListEntryAtPosition($event->taskListPosition()); $taskListEntry->markAsSuccessfulDone($event->createdAt()); }