id = $id; $this->width = $width; $this->height = $height; $this->file = $file; $this->size = $size; $this->alt = $alt; $this->url = $url; $this->photographer = $photographer; $this->photographer_url = $photographer_url; } /** * @return array{id: int, width: int, height: int, file: string, size: string, alt: string, url: string, photographer: string, photographer_url: string} */ public function toArray(): array { return [ 'id' => $this->id, 'width' => $this->width, 'height' => $this->height, 'file' => $this->file, 'size' => $this->size, 'alt' => $this->alt, 'url' => $this->url, 'photographer' => $this->photographer, 'photographer_url' => $this->photographer_url, ]; } }