public function addStep(Step $step)
    {
        if (!$this->steps->contains($step)) {
            $step->setOrder($this->steps->count());
            $this->steps->add($step);
            $step->setExercise($this);
        }

        return $this;
    }
public function addStep(Step $step)
    {
        if (!$this->steps->contains($step)) {
            $step->setOrder($this->steps->count());
            $this->steps->add($step);
            $step->setExercise($this);
        }

        return $this;
    }
public function addStep ( Step $ step ) { if ( ! $ this -> steps -> contains ( $ step ) ) { $ step -> setOrder ( $ this -> steps -> count ( ) ) ; $ this -> steps -> add ( $ step ) ; $ step -> setExercise ( $ this ) ; } return $ this ; }
Adds a step to the Exercise.

@param Step $step

@return $this
Adds a step to the Exercise .