Total Complexity | 6 |
Total Lines | 78 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | class Photo |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $photoReference; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | private $height; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $width; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | private $htmlAttributions = []; |
||
39 | |||
40 | /** |
||
41 | * @param string $photoReference |
||
42 | * @param int $height |
||
43 | * @param int $width |
||
44 | * @param array $htmlAttributions |
||
45 | */ |
||
46 | public function __construct(string $photoReference, int $height, int $width, array $htmlAttributions) |
||
47 | { |
||
48 | $this->photoReference = $photoReference; |
||
49 | $this->height = $height; |
||
50 | $this->width = $width; |
||
51 | $this->htmlAttributions = $htmlAttributions; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getPhotoReference(): string |
||
58 | { |
||
59 | return $this->photoReference; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return int |
||
64 | */ |
||
65 | public function getHeight(): int |
||
66 | { |
||
67 | return $this->height; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return int |
||
72 | */ |
||
73 | public function getWidth(): int |
||
74 | { |
||
75 | return $this->width; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @return array |
||
80 | */ |
||
81 | public function getHtmlAttributions(): array |
||
82 | { |
||
83 | return $this->htmlAttributions; |
||
84 | } |
||
85 | |||
86 | public static function getPhotosFromResult(array $photos): array |
||
96 | } |
||
97 | } |
||
98 |