/**
  * @param StepRegistration $currentStep
  *
  * @throws PipelineBuildingException
  */
 private function addAftersToDirectedGraph(StepRegistration $currentStep)
 {
     foreach ($currentStep->getAfters() as $after) {
         if (!isset($this->idToStep[$after->getDependsOnId()]) && $after->isEnforced()) {
             $allStepIds = implode(',', array_keys($this->idToStep));
             throw new PipelineBuildingException("Registration '{$after->getDependsOnId()}' specified in the insertafter of the '{$currentStep->getStepId()}' step does not exist. Current step ids: {$allStepIds}.");
         }
         if (isset($this->idToStep[$after->getDependsOnId()])) {
             $this->idDirectedGraph[$after->getDependsOnId()][] = $after->getDependantId();
         }
     }
 }
示例#2
0
 /**
  * @param StepRegistration $stageConnector
  *
  * @return bool
  */
 private function isTerminator($stageConnector)
 {
     return $this->isImplementing($stageConnector->getStepFqcn(), PipelineTerminatorInterface::class);
 }