/** * @param TubeStatus $goal * @param int $mode * @return $this */ public function transformTubeStatusTo(TubeStatus $goal, $mode = TubeStatus::TRANSFORM_BOTH) { foreach ($this->tubeStatus->transformTo($goal, $mode) as $transformCommand) { $this->dispatchCommand($transformCommand)->invoke(); } return $this; }