public function removeStep($stepIdentifier)
    {
        $removedOccurrences = 0;
        foreach ($this->steps as $previousStepIdentifier => $steps) {
            foreach ($steps as $index => $step) {
                if ($step->getIdentifier() === $stepIdentifier) {
                    unset($this->steps[$previousStepIdentifier][$index]);
                    $removedOccurrences ++;
                }
            }
        }
        if ($removedOccurrences === 0) {
            throw new Exception(sprintf('Cannot remove sequence step with identifier "%s" because no such step exists in the given sequence.', $stepIdentifier), 1322591669);
        }
    }
public function removeStep($stepIdentifier)
    {
        $removedOccurrences = 0;
        foreach ($this->steps as $previousStepIdentifier => $steps) {
            foreach ($steps as $index => $step) {
                if ($step->getIdentifier() === $stepIdentifier) {
                    unset($this->steps[$previousStepIdentifier][$index]);
                    $removedOccurrences ++;
                }
            }
        }
        if ($removedOccurrences === 0) {
            throw new Exception(sprintf('Cannot remove sequence step with identifier "%s" because no such step exists in the given sequence.', $stepIdentifier), 1322591669);
        }
    }
public function removeStep ( $ stepIdentifier ) { $ removedOccurrences = 0 ; foreach ( $ this -> steps as $ previousStepIdentifier => $ steps ) { foreach ( $ steps as $ index => $ step ) { if ( $ step -> getIdentifier ( ) === $ stepIdentifier ) { unset ( $ this -> steps [ $ previousStepIdentifier ] [ $ index ] ) ; $ removedOccurrences ++ ; } } } if ( $ removedOccurrences === 0 ) { throw new Exception ( 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
@throws Exception
@return void
Removes all occurrences of the specified step from this sequence