you can replace the if /else with a simple return $this-> ....