id, $user->name, $user->avatar); } /** @return array */ public function toArray(): array { return [ 'type' => 'playlist_collaborators', 'id' => $this->id, 'name' => $this->name, 'avatar' => $this->avatar, ]; } }