*/ public function toArray(Request $request): array { return [ /* * @var string $name * Name of the candidate */ 'name' => $this['name'], /* * @var int $votes * Number of votes the candidate received */ 'votes' => (int) $this['votes'], ]; } }