private function GeneratePlanets($numberOfPlanets = null) { $numberOfPlanets = $numberOfPlanets != null ? $numberOfPlanets : Random::Number(); for ($i = 0; $i < $numberOfPlanets; $i++) { $this->planets[] = new Planet(); } }
function __construct($name = null, $position = null, $radius = null) { $this->name = $name ? $name : Random::Name(); $this->position = $position ? $position : Random::Vector3(); $this->radius = $radius ? $radius : Random::Number(); }