name; } public function getIcon(): ?string { return $this->icon; } /** * @return mixed[] */ public function jsonSerialize(): array { $json = [ 'name' => $this->name, ]; if ($this->icon !== null) { $json['icon'] = $this->icon; } return $json; } }