width($width); $this->height($height); if (!$name) { $name = $this->generateName(); } $this->name($name); } public function width(int $width = null): int|World { if ($width) { $this->width = $width; return $this; } return $this->width; } public function height(int $height = null): int|World { if ($height) { $this->height = $height; return $this; } return $this->height; } public function name(string $name = null): string|World { if ($name) { $this->name = $name; return $this; } return $this->name; } protected function generateName() { return uniqid('world'); } }