public function removeStep(string $stepIdentifier)
    {
        $removedOccurrences = 0;
        foreach ($this->steps as $previousStepIdentifier => $steps) {
            foreach ($steps as $step) {
                if ($step->getIdentifier() === $stepIdentifier) {
                    unset($this->steps[$previousStepIdentifier][$stepIdentifier]);
                    $removedOccurrences++;
                }
            }
        }
        if ($removedOccurrences === 0) {
            throw new FlowException(sprintf('Cannot remove sequence step with identifier "%s" because no such step exists in the given sequence.', $stepIdentifier), 1322591669);
        }
    }
public function removeStep(string $stepIdentifier)
    {
        $removedOccurrences = 0;
        foreach ($this->steps as $previousStepIdentifier => $steps) {
            foreach ($steps as $step) {
                if ($step->getIdentifier() === $stepIdentifier) {
                    unset($this->steps[$previousStepIdentifier][$stepIdentifier]);
                    $removedOccurrences++;
                }
            }
        }
        if ($removedOccurrences === 0) {
            throw new FlowException(sprintf('Cannot remove sequence step with identifier "%s" because no such step exists in the given sequence.', $stepIdentifier), 1322591669);
        }
    }
public function removeStep ( string $ stepIdentifier ) { $ removedOccurrences = 0 ; foreach ( $ this -> steps as $ previousStepIdentifier => $ steps ) { foreach ( $ steps as $ step ) { if ( $ step -> getIdentifier ( ) === $ stepIdentifier ) { unset ( $ this -> steps [ $ previousStepIdentifier ] [ $ stepIdentifier ] ) ; $ removedOccurrences ++ ; } } } if ( $ removedOccurrences === 0 ) { throw new FlowException ( sprintf ( 'Cannot remove sequence step with identifier "%s" because no such step exists in the given sequence.' , $ stepIdentifier ) , 1322591669 ) ; } }
Removes all occurrences of the specified step from this sequence

@param string $stepIdentifier
@return void
@throws FlowException
Removes all occurrences of the specified step from this sequence