original_string: private function hasPassed(TaskExecutionInterface $execution, $result)
      {
          // this find is necessary because the storage could be
          // invalid (clear in doctrine) after handling an execution.
          $execution = $this->taskExecutionRepository->findByUuid($execution->getUuid());
          $execution->setStatus(TaskStatus::COMPLETED);
          $execution->setResult($result);
  
          $this->eventDispatcher->dispatch(
              Events::TASK_PASSED,
              new TaskExecutionEvent($execution->getTask(), $execution)
          );
  
          return $execution;
      }
code: private function hasPassed(TaskExecutionInterface $execution, $result)
      {
          // this find is necessary because the storage could be
          // invalid (clear in doctrine) after handling an execution.
          $execution = $this->taskExecutionRepository->findByUuid($execution->getUuid());
          $execution->setStatus(TaskStatus::COMPLETED);
          $execution->setResult($result);
  
          $this->eventDispatcher->dispatch(
              Events::TASK_PASSED,
              new TaskExecutionEvent($execution->getTask(), $execution)
          );
  
          return $execution;
      }
code_tokens: private function hasPassed ( TaskExecutionInterface $ execution , $ result ) { // this find is necessary because the storage could be // invalid (clear in doctrine) after handling an execution. $ execution = $ this -> taskExecutionRepository -> findByUuid ( $ execution -> getUuid ( ) ) ; $ execution -> setStatus ( TaskStatus :: COMPLETED ) ; $ execution -> setResult ( $ result ) ; $ this -> eventDispatcher -> dispatch ( Events :: TASK_PASSED , new TaskExecutionEvent ( $ execution -> getTask ( ) , $ execution ) ) ; return $ execution ; }
docstring: The given task passed the run.
  
  @param TaskExecutionInterface $execution
  @param mixed $result
  
  @return TaskExecutionInterface
docstring_tokens: The given task passed the run .