@param StepRegistration[] $stageSteps

@return StepRegistration[]
348759
private function sort(array $stageSteps)
    {
        if (empty($stageSteps)) {
            return [];
        }

        $dependencyGraphBuilder = new StepDependencyGraphBuilder($stageSteps);
        return $dependencyGraphBuilder->build()->sort();
    }
988829
protected function getSteps() {
        if (!$this->_steps) {
            $this->_steps = new StepList($this->version, $this->solution['flowSid'], $this->solution['sid']);
        }

        return $this->_steps;
    }
1291707
public List<Object> stepsInstances(List<CandidateSteps> candidateSteps) {
        List<Object> instances = new ArrayList<>();
        for (CandidateSteps steps : candidateSteps) {
            if (steps instanceof Steps) {
                instances.add(((Steps) steps).instance());
            }
        }
        return instances;
    }
668450
protected function processStep(Node\Step $step)
    {
        $result = [
            'keyword' => $step->getKeyword(),
            'name' => $step->getName(),
            'line' => $step->getLine(),
            'match' => $step->getMatch(),
            'result' => $step->getProcessedResult(),
            'arguments' => $this->processArguments($step->getArguments()),
        ];

        if (count($step->getEmbeddings())) {
            $result['embeddings'] = $step->getEmbeddings();
        }

        return $result;
    }
929618
public function getStep($stepId)
    {
        foreach ($this->steps as $step) {
            if ($step->getId() === $stepId) {
                return $step;
            }
        }

        return $this->dummy;
    }
32689
public function monochromatic(int $steps = 5): array
    {
        $colors          = [];
        $percentage      = 80 / $steps;
        $numberToLighten = floor(($this->baseColor->getHsl()['l'] * 80) / $percentage);

        for ($i = $numberToLighten; $i > 0; $i--) {
            array_push($colors, $this->baseColor->lighten($percentage * $i));
        }

        array_push($colors, $this->baseColor);

        for ($i = 1; $i < $steps - $numberToLighten + 1; $i++) {
            array_push($colors, $this->baseColor->darken($percentage * $i));
        }

        return $colors;
    }
539129
public com.google.api.ads.admanager.axis.v201808.ProgressStep[] getSteps() {
        return steps;
    }
859497
public function getStepsArray()
    {
        $steps = null;

        if ($this->getSteps() && $this->getSteps()[0] === '{') {
            $steps = json_decode($this->getSteps(), true);
        } elseif ($this->getSteps()) {
            $steps = explode(',', $this->getSteps());
        }
        if (!$steps) {
            $steps = array('index','play','result','bounce');
        }
        return $steps;
    }
231044
public static function range($max, $start = 1, $step = 1)
    {
        if ($step < 1) {
            return [];
        }

        $array = [];
        for ($i = $start; $i <= $max; $i += $step) {
            $array[] = $i;
        }

        return $array;
    }
1015516
public function build()
    {
        $this->assertAdditionsAreUnique();

        /** @var StepRegistration[] $registrations */
        $registrations = [];

        foreach ($this->additions as $addition) {
            $registrations[$addition->getStepId()] = $addition;
        }

        $this->assertReplacementsAreValid($registrations);

        foreach ($this->replacements as $replacement) {
            $registrations[$replacement->getIdToReplace()]->replaceWith($replacement);
        }

        $this->assertRemovalsAreValid($registrations);
        $this->assertRemovalsDoNotAffectDependencies($registrations);

        foreach ($this->removals as $removal) {
            if (isset($registrations[$removal->getIdToRemove()])) {
                unset($registrations[$removal->getIdToRemove()]);
            }
        }

        if (empty($registrations)) {
            return [];
        }

        $stages = $this->groupRegistrationsByStage($registrations);

        $this->assertContextStageExists($this->rootContextClass, $stages);
        $currentStage = $stages[$this->rootContextClass];
        $stageName = $this->rootContextClass;

        $finalOrder = [];
        $stageNumber = 1;
        while ($currentStage) {
            $stageSteps = $this->getStepsFromStage($currentStage);
            $finalOrder = array_merge($finalOrder, $this->sort($stageSteps));

            $stageConnectors = $this->getConnectorsFromStage($currentStage);

            $this->assertThereIsAtMostOneConnectorPerStage($stageName, $stageConnectors);
            $this->assertThereIsAtLeastOneConnectorPerIntermediaryStage(
                $stageNumber,
                count($stages),
                $stageName,
                $stageConnectors
            );

            $currentStage = null;

            /** @var StepRegistration $stageConnector */
            $stageConnector = reset($stageConnectors);
            if ($stageConnector) {
                $finalOrder[] = $stageConnector;

                if (!$this->isTerminator($stageConnector)) {
                    /** @var StageConnectorInterface $connectorClass */
                    $connectorClass = $stageConnector->getStepFqcn();
                    $stageName = $connectorClass::getNextStageContextClass();
                    $this->assertContextStageExists($stageName, $stages);

                    $currentStage = $stages[$stageName];
                }
            }

            $stageNumber++;
        }

        return $finalOrder;
    }
641781
def _get_validated_stages(stages):
    
    if not isinstance(stages, list):
        raise WorkflowBuilderException("Stages must be specified as a list of dictionaries")
    validated_stages = []
    for index, stage in enumerate(stages):
        validated_stages.append(_get_validated_stage(stage, index))
    return validated_stages
643622
public function registerPipelineStep($stepId, $stepFqcn, callable $factory = null, $description = null)
    {
        return $this->pipelineModifications->registerStep($stepId, $stepFqcn, $factory, $description);
    }
619707
public function Children() {
		if (!$this->children) {
			$this->children = new ArrayList();
			$kids = $this->stageChildren();
			if ($kids) {
				foreach ($kids as $child) {
					if ($child->canView()) {
						$this->children->push($child);
					}
				}
			}
		}
		return $this->children;
	}
1305323
public function stages($stages)
    {
        if (is_array($stages)) {
            $implode = implode(',', $stages);
            $this->option('-S', $implode);
        } else {
            $this->option('-S', $stages);
        }

        return $this;
    }
866569
public function skip(int $step): ArrayCollection
    {
        $items = [];
        $pos = 0;

        foreach ($this->items as $key => $value) {
            if ($pos % $step === 0) {
                $items[$key] = $value;
            }
            $pos++;
        }

        return new static($items);
    }
94603
protected function buildSteps($processName, $steps, $container, $stepClass)
    {
        $stepReferences = array();

        foreach ($steps as $stepName => $stepConfig) {
            $definition = new Definition($stepClass, array(
                $stepName,
                $stepConfig['label'],
                array(),
                $stepConfig['model_status'],
                $stepConfig['roles'],
                $stepConfig['on_invalid'],
            ));

            $this->addStepNextStates($definition, $stepConfig['next_states'], $processName);

            $definition->setPublic(false)
                       ->addTag(sprintf('lexik_workflow.process.%s.step', $processName), array('alias' => $stepName));

            $stepReference = sprintf('lexik_workflow.process.%s.step.%s', $processName, $stepName);
            $container->setDefinition($stepReference, $definition);

            $stepReferences[$stepName] = new Reference($stepReference);
        }

        return $stepReferences;
    }
388969
public function lookup(string $from) : Stage\Lookup
    {
        $stage = new Stage\Lookup($this, $from, $this->dm, $this->class);
        $this->addStage($stage);

        return $stage;
    }