'', 'full' => ''] ): self { return new self($url, $image, $bio); } public static function fromLastFmData(object $data): self { return self::make( url: $data->url, bio: [ 'summary' => isset($data->bio) ? self::formatLastFmText($data->bio->summary) : '', 'full' => isset($data->bio) ? self::formatLastFmText($data->bio->content) : '', ], ); } /** @return array */ public function toArray(): array { return [ 'url' => $this->url, 'image' => $this->image, 'bio' => $this->bio, ]; } }