public function clearEmptySteps()
    {
        foreach ($this as $field) {
            if ($field instanceof UserFormsStepField && count($field->getChildren()) === 0) {
                $this->remove($field);
            }
        }
    }
public function clearEmptySteps()
    {
        foreach ($this as $field) {
            if ($field instanceof UserFormsStepField && count($field->getChildren()) === 0) {
                $this->remove($field);
            }
        }
    }
public function clearEmptySteps ( ) { foreach ( $ this as $ field ) { if ( $ field instanceof UserFormsStepField && count ( $ field -> getChildren ( ) ) === 0 ) { $ this -> remove ( $ field ) ; } } }
Remove all empty steps
Remove all empty steps