@@ -65,7 +65,8 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function getId() : int |
67 | 67 | { |
68 | - if (!empty($this->data->id)) { |
|
68 | + if (!empty($this->data->id)) |
|
69 | + { |
|
69 | 70 | return (int) $this->data->id; |
70 | 71 | } |
71 | 72 | return 0; |
@@ -77,7 +78,8 @@ discard block |
||
77 | 78 | */ |
78 | 79 | public function getAirDate() : string |
79 | 80 | { |
80 | - if (!empty($this->data->air_date)) { |
|
81 | + if (!empty($this->data->air_date)) |
|
82 | + { |
|
81 | 83 | return $this->data->air_date; |
82 | 84 | } |
83 | 85 | return ''; |
@@ -89,7 +91,8 @@ discard block |
||
89 | 91 | */ |
90 | 92 | public function getEpisodeCount() : int |
91 | 93 | { |
92 | - if (!empty($this->data->episodes)) { |
|
94 | + if (!empty($this->data->episodes)) |
|
95 | + { |
|
93 | 96 | return count($this->data->episodes); |
94 | 97 | } |
95 | 98 | return 0; |
@@ -101,7 +104,8 @@ discard block |
||
101 | 104 | */ |
102 | 105 | public function getSeasonNumber() : int |
103 | 106 | { |
104 | - if (!empty($this->data->season_number)) { |
|
107 | + if (!empty($this->data->season_number)) |
|
108 | + { |
|
105 | 109 | return (int) $this->data->season_number; |
106 | 110 | } |
107 | 111 | return 0; |
@@ -113,8 +117,10 @@ discard block |
||
113 | 117 | */ |
114 | 118 | public function getEpisodes() : \Generator |
115 | 119 | { |
116 | - if (!empty($this->data->episodes)) { |
|
117 | - foreach ($this->data->episodes as $episode) { |
|
120 | + if (!empty($this->data->episodes)) |
|
121 | + { |
|
122 | + foreach ($this->data->episodes as $episode) |
|
123 | + { |
|
118 | 124 | $episode = new Results\TVEpisode($this->tmdb, $episode); |
119 | 125 | yield $episode; |
120 | 126 | } |
@@ -127,7 +133,8 @@ discard block |
||
127 | 133 | */ |
128 | 134 | public function getName() : string |
129 | 135 | { |
130 | - if (!empty($this->data->name)) { |
|
136 | + if (!empty($this->data->name)) |
|
137 | + { |
|
131 | 138 | return $this->data->name; |
132 | 139 | } |
133 | 140 | return ''; |
@@ -139,7 +146,8 @@ discard block |
||
139 | 146 | */ |
140 | 147 | public function getOverview() : string |
141 | 148 | { |
142 | - if (!empty($this->data->overview)) { |
|
149 | + if (!empty($this->data->overview)) |
|
150 | + { |
|
143 | 151 | return $this->data->overview; |
144 | 152 | } |
145 | 153 | return ''; |
@@ -153,7 +161,8 @@ discard block |
||
153 | 161 | { |
154 | 162 | $data = $this->tmdb->getRequest('tv/' . (int) $this->tv_id . '/season/' . $this->season_number . '/images', $this->params); |
155 | 163 | |
156 | - foreach ($data->posters as $b) { |
|
164 | + foreach ($data->posters as $b) |
|
165 | + { |
|
157 | 166 | $image = new Results\Image($this->tmdb, $this->id, $b); |
158 | 167 | yield $image; |
159 | 168 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -37,12 +37,15 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array()) |
39 | 39 | { |
40 | - try { |
|
40 | + try |
|
41 | + { |
|
41 | 42 | $this->tmdb = $tmdb; |
42 | 43 | $this->logger = $tmdb->getLogger(); |
43 | 44 | $this->params = $this->tmdb->checkOptions($options); |
44 | 45 | $this->data = $this->tmdb->getRequest('person/' . $people_id.'/movie_credits', $this->params); |
45 | - } catch (TmdbException $ex) { |
|
46 | + } |
|
47 | + catch (TmdbException $ex) |
|
48 | + { |
|
46 | 49 | throw $ex; |
47 | 50 | } |
48 | 51 | } |
@@ -53,8 +56,10 @@ discard block |
||
53 | 56 | */ |
54 | 57 | public function getCrew() : \Generator |
55 | 58 | { |
56 | - if (!empty($this->data->crew)) { |
|
57 | - foreach ($this->data->crew as $c) { |
|
59 | + if (!empty($this->data->crew)) |
|
60 | + { |
|
61 | + foreach ($this->data->crew as $c) |
|
62 | + { |
|
58 | 63 | $crew = new PeopleMovieCrew($this->tmdb, $c); |
59 | 64 | yield $crew; |
60 | 65 | } |
@@ -67,8 +72,10 @@ discard block |
||
67 | 72 | */ |
68 | 73 | public function getCast() : \Generator |
69 | 74 | { |
70 | - if (!empty($this->data->cast)) { |
|
71 | - foreach ($this->data->cast as $c) { |
|
75 | + if (!empty($this->data->cast)) |
|
76 | + { |
|
77 | + foreach ($this->data->cast as $c) |
|
78 | + { |
|
72 | 79 | $cast = new PeopleMovieCast($this->tmdb, $c); |
73 | 80 | yield $cast; |
74 | 81 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->tmdb = $tmdb; |
42 | 42 | $this->logger = $tmdb->getLogger(); |
43 | 43 | $this->params = $this->tmdb->checkOptions($options); |
44 | - $this->data = $this->tmdb->getRequest('person/' . $people_id.'/movie_credits', $this->params); |
|
44 | + $this->data = $this->tmdb->getRequest('person/' . $people_id . '/movie_credits', $this->params); |
|
45 | 45 | } catch (TmdbException $ex) { |
46 | 46 | throw $ex; |
47 | 47 | } |
@@ -37,12 +37,15 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array()) |
39 | 39 | { |
40 | - try { |
|
40 | + try |
|
41 | + { |
|
41 | 42 | $this->tmdb = $tmdb; |
42 | 43 | $this->logger = $tmdb->getLogger(); |
43 | 44 | $this->params = $this->tmdb->checkOptions($options); |
44 | 45 | $this->data = $this->tmdb->getRequest('person/' . $people_id.'/tv_credits', $this->params); |
45 | - } catch (TmdbException $ex) { |
|
46 | + } |
|
47 | + catch (TmdbException $ex) |
|
48 | + { |
|
46 | 49 | throw $ex; |
47 | 50 | } |
48 | 51 | } |
@@ -53,8 +56,10 @@ discard block |
||
53 | 56 | */ |
54 | 57 | public function getCrew() : \Generator |
55 | 58 | { |
56 | - if (!empty($this->data->crew)) { |
|
57 | - foreach ($this->data->crew as $c) { |
|
59 | + if (!empty($this->data->crew)) |
|
60 | + { |
|
61 | + foreach ($this->data->crew as $c) |
|
62 | + { |
|
58 | 63 | $crew = new PeopleTVShowCrew($this->tmdb, $c); |
59 | 64 | yield $crew; |
60 | 65 | } |
@@ -67,8 +72,10 @@ discard block |
||
67 | 72 | */ |
68 | 73 | public function getCast() : \Generator |
69 | 74 | { |
70 | - if (!empty($this->data->cast)) { |
|
71 | - foreach ($this->data->cast as $c) { |
|
75 | + if (!empty($this->data->cast)) |
|
76 | + { |
|
77 | + foreach ($this->data->cast as $c) |
|
78 | + { |
|
72 | 79 | $cast = new PeopleTVShowCast($this->tmdb, $c); |
73 | 80 | yield $cast; |
74 | 81 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->tmdb = $tmdb; |
42 | 42 | $this->logger = $tmdb->getLogger(); |
43 | 43 | $this->params = $this->tmdb->checkOptions($options); |
44 | - $this->data = $this->tmdb->getRequest('person/' . $people_id.'/tv_credits', $this->params); |
|
44 | + $this->data = $this->tmdb->getRequest('person/' . $people_id . '/tv_credits', $this->params); |
|
45 | 45 | } catch (TmdbException $ex) { |
46 | 46 | throw $ex; |
47 | 47 | } |
@@ -47,7 +47,8 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function getDescription() : string |
49 | 49 | { |
50 | - if (isset($this->data->description)) { |
|
50 | + if (isset($this->data->description)) |
|
51 | + { |
|
51 | 52 | return $this->data->description; |
52 | 53 | } |
53 | 54 | return ''; |
@@ -59,7 +60,8 @@ discard block |
||
59 | 60 | */ |
60 | 61 | public function getHeadQuarters() : string |
61 | 62 | { |
62 | - if (isset($this->data->headquarters)) { |
|
63 | + if (isset($this->data->headquarters)) |
|
64 | + { |
|
63 | 65 | return $this->data->headquarters; |
64 | 66 | } |
65 | 67 | return ''; |
@@ -71,7 +73,8 @@ discard block |
||
71 | 73 | */ |
72 | 74 | public function getHomePage() : string |
73 | 75 | { |
74 | - if (isset($this->data->homepage)) { |
|
76 | + if (isset($this->data->homepage)) |
|
77 | + { |
|
75 | 78 | return $this->data->homepage; |
76 | 79 | } |
77 | 80 | return ''; |
@@ -83,7 +86,8 @@ discard block |
||
83 | 86 | */ |
84 | 87 | public function getId() : int |
85 | 88 | { |
86 | - if (isset($this->data->id)) { |
|
89 | + if (isset($this->data->id)) |
|
90 | + { |
|
87 | 91 | return $this->data->id; |
88 | 92 | } |
89 | 93 | return 0; |
@@ -95,7 +99,8 @@ discard block |
||
95 | 99 | */ |
96 | 100 | public function getLogoPath() : string |
97 | 101 | { |
98 | - if (isset($this->data->logo_path)) { |
|
102 | + if (isset($this->data->logo_path)) |
|
103 | + { |
|
99 | 104 | return $this->data->logo_path; |
100 | 105 | } |
101 | 106 | return ''; |
@@ -107,7 +112,8 @@ discard block |
||
107 | 112 | */ |
108 | 113 | public function getName() : string |
109 | 114 | { |
110 | - if (isset($this->data->name)) { |
|
115 | + if (isset($this->data->name)) |
|
116 | + { |
|
111 | 117 | return $this->data->name; |
112 | 118 | } |
113 | 119 | return ''; |
@@ -121,7 +127,8 @@ discard block |
||
121 | 127 | { |
122 | 128 | $data = $this->tmdb->getRequest('company/' . (int) $this->id . '/movies', $this->params); |
123 | 129 | |
124 | - foreach ($data->results as $m) { |
|
130 | + foreach ($data->results as $m) |
|
131 | + { |
|
125 | 132 | $movie = new Results\Movie($this->tmdb, $m); |
126 | 133 | yield $movie; |
127 | 134 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -51,7 +51,8 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function getAdult() : bool |
53 | 53 | { |
54 | - if (isset($this->data->adult)) { |
|
54 | + if (isset($this->data->adult)) |
|
55 | + { |
|
55 | 56 | return $this->data->adult; |
56 | 57 | } |
57 | 58 | return false; |
@@ -63,7 +64,8 @@ discard block |
||
63 | 64 | */ |
64 | 65 | public function getAlsoKnownAs() : array |
65 | 66 | { |
66 | - if (isset($this->data->also_known_as)) { |
|
67 | + if (isset($this->data->also_known_as)) |
|
68 | + { |
|
67 | 69 | return $this->data->also_known_as; |
68 | 70 | } |
69 | 71 | return []; |
@@ -75,7 +77,8 @@ discard block |
||
75 | 77 | */ |
76 | 78 | public function getBiography() : string |
77 | 79 | { |
78 | - if (isset($this->data->biography)) { |
|
80 | + if (isset($this->data->biography)) |
|
81 | + { |
|
79 | 82 | return $this->data->biography; |
80 | 83 | } |
81 | 84 | return ''; |
@@ -87,7 +90,8 @@ discard block |
||
87 | 90 | */ |
88 | 91 | public function getBirthday() : string |
89 | 92 | { |
90 | - if (isset($this->data->birthday)) { |
|
93 | + if (isset($this->data->birthday)) |
|
94 | + { |
|
91 | 95 | return $this->data->birthday; |
92 | 96 | } |
93 | 97 | return ''; |
@@ -99,7 +103,8 @@ discard block |
||
99 | 103 | */ |
100 | 104 | public function getDeathday() : string |
101 | 105 | { |
102 | - if (isset($this->data->deathday)) { |
|
106 | + if (isset($this->data->deathday)) |
|
107 | + { |
|
103 | 108 | return $this->data->deathday; |
104 | 109 | } |
105 | 110 | return ''; |
@@ -111,7 +116,8 @@ discard block |
||
111 | 116 | */ |
112 | 117 | public function getGender() : int |
113 | 118 | { |
114 | - if (isset($this->data->gender)) { |
|
119 | + if (isset($this->data->gender)) |
|
120 | + { |
|
115 | 121 | return $this->data->gender; |
116 | 122 | } |
117 | 123 | return 0; |
@@ -123,7 +129,8 @@ discard block |
||
123 | 129 | */ |
124 | 130 | public function getHomepage() : string |
125 | 131 | { |
126 | - if (isset($this->data->homepage)) { |
|
132 | + if (isset($this->data->homepage)) |
|
133 | + { |
|
127 | 134 | return $this->data->homepage; |
128 | 135 | } |
129 | 136 | return ''; |
@@ -135,7 +142,8 @@ discard block |
||
135 | 142 | */ |
136 | 143 | public function getId() : int |
137 | 144 | { |
138 | - if (isset($this->data->id)) { |
|
145 | + if (isset($this->data->id)) |
|
146 | + { |
|
139 | 147 | return $this->data->id; |
140 | 148 | } |
141 | 149 | return 0; |
@@ -147,7 +155,8 @@ discard block |
||
147 | 155 | */ |
148 | 156 | public function getImdbId() : string |
149 | 157 | { |
150 | - if (isset($this->data->imdb_id)) { |
|
158 | + if (isset($this->data->imdb_id)) |
|
159 | + { |
|
151 | 160 | return $this->data->imdb_id; |
152 | 161 | } |
153 | 162 | return ''; |
@@ -159,7 +168,8 @@ discard block |
||
159 | 168 | */ |
160 | 169 | public function getName() : string |
161 | 170 | { |
162 | - if (isset($this->data->name)) { |
|
171 | + if (isset($this->data->name)) |
|
172 | + { |
|
163 | 173 | return $this->data->name; |
164 | 174 | } |
165 | 175 | return ''; |
@@ -171,7 +181,8 @@ discard block |
||
171 | 181 | */ |
172 | 182 | public function getPlaceOfBirth() : string |
173 | 183 | { |
174 | - if (isset($this->data->place_of_birth)) { |
|
184 | + if (isset($this->data->place_of_birth)) |
|
185 | + { |
|
175 | 186 | return $this->data->place_of_birth; |
176 | 187 | } |
177 | 188 | return ''; |
@@ -183,7 +194,8 @@ discard block |
||
183 | 194 | */ |
184 | 195 | public function getPopularity() : float |
185 | 196 | { |
186 | - if (isset($this->data->popularity)) { |
|
197 | + if (isset($this->data->popularity)) |
|
198 | + { |
|
187 | 199 | return $this->data->popularity; |
188 | 200 | } |
189 | 201 | return 0; |
@@ -195,7 +207,8 @@ discard block |
||
195 | 207 | */ |
196 | 208 | public function getProfilePath() : string |
197 | 209 | { |
198 | - if (isset($this->data->profile_path)) { |
|
210 | + if (isset($this->data->profile_path)) |
|
211 | + { |
|
199 | 212 | return $this->data->profile_path; |
200 | 213 | } |
201 | 214 | return ''; |
@@ -209,7 +222,8 @@ discard block |
||
209 | 222 | { |
210 | 223 | $data = $this->tmdb->getRequest('person/' . (int) $this->id . '/images', $this->params); |
211 | 224 | |
212 | - foreach ($data->profiles as $b) { |
|
225 | + foreach ($data->profiles as $b) |
|
226 | + { |
|
213 | 227 | $image = new Results\Image($this->tmdb, $this->id, $b); |
214 | 228 | yield $image; |
215 | 229 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * This file is part of the Tmdb package. |
@@ -75,7 +75,8 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getName() : string |
77 | 77 | { |
78 | - if (isset($this->data->name)) { |
|
78 | + if (isset($this->data->name)) |
|
79 | + { |
|
79 | 80 | return $this->data->name; |
80 | 81 | } |
81 | 82 | $this->logger->error('Collection name not found', array('collection_id' => $this->id)); |
@@ -88,8 +89,10 @@ discard block |
||
88 | 89 | */ |
89 | 90 | public function getParts() : \Generator |
90 | 91 | { |
91 | - if (!empty($this->data->parts)) { |
|
92 | - foreach ($this->data->parts as $part) { |
|
92 | + if (!empty($this->data->parts)) |
|
93 | + { |
|
94 | + foreach ($this->data->parts as $part) |
|
95 | + { |
|
93 | 96 | $movie = new Results\Movie($this->tmdb, $part); |
94 | 97 | yield $movie; |
95 | 98 | } |
@@ -104,7 +107,8 @@ discard block |
||
104 | 107 | { |
105 | 108 | $data = $this->tmdb->getRequest('collection/' . (int) $this->id . '/images', $this->params); |
106 | 109 | |
107 | - foreach ($data->backdrops as $b) { |
|
110 | + foreach ($data->backdrops as $b) |
|
111 | + { |
|
108 | 112 | $image = new Results\Image($this->tmdb, $this->id, $b); |
109 | 113 | yield $image; |
110 | 114 | } |
@@ -118,7 +122,8 @@ discard block |
||
118 | 122 | { |
119 | 123 | $data = $this->tmdb->getRequest('collection/' . (int) $this->id . '/images', $this->params); |
120 | 124 | |
121 | - foreach ($data->posters as $b) { |
|
125 | + foreach ($data->posters as $b) |
|
126 | + { |
|
122 | 127 | $image = new Results\Image($this->tmdb, $this->id, $b); |
123 | 128 | yield $image; |
124 | 129 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -71,7 +71,8 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getId(): int |
73 | 73 | { |
74 | - if (isset($this->data->id)) { |
|
74 | + if (isset($this->data->id)) |
|
75 | + { |
|
75 | 76 | return (int) $this->data->id; |
76 | 77 | } |
77 | 78 | return 0; |
@@ -83,7 +84,8 @@ discard block |
||
83 | 84 | */ |
84 | 85 | public function getAirDate() : string |
85 | 86 | { |
86 | - if (isset($this->data->air_date)) { |
|
87 | + if (isset($this->data->air_date)) |
|
88 | + { |
|
87 | 89 | return $this->data->air_date; |
88 | 90 | } |
89 | 91 | return ''; |
@@ -95,7 +97,8 @@ discard block |
||
95 | 97 | */ |
96 | 98 | public function getEpisodeNumber() : int |
97 | 99 | { |
98 | - if (isset($this->data->episode_number)) { |
|
100 | + if (isset($this->data->episode_number)) |
|
101 | + { |
|
99 | 102 | return $this->data->episode_number; |
100 | 103 | } |
101 | 104 | return 0; |
@@ -107,8 +110,10 @@ discard block |
||
107 | 110 | */ |
108 | 111 | public function getGuestStars() : \Generator |
109 | 112 | { |
110 | - if (isset($this->data->guest_stars)) { |
|
111 | - foreach ($this->data->guest_stars as $gs) { |
|
113 | + if (isset($this->data->guest_stars)) |
|
114 | + { |
|
115 | + foreach ($this->data->guest_stars as $gs) |
|
116 | + { |
|
112 | 117 | $gs->gender = null; |
113 | 118 | $gs->cast_id = null; |
114 | 119 | |
@@ -124,7 +129,8 @@ discard block |
||
124 | 129 | */ |
125 | 130 | public function getName() : string |
126 | 131 | { |
127 | - if (isset($this->data->name)) { |
|
132 | + if (isset($this->data->name)) |
|
133 | + { |
|
128 | 134 | return $this->data->name; |
129 | 135 | } |
130 | 136 | return ''; |
@@ -136,7 +142,8 @@ discard block |
||
136 | 142 | */ |
137 | 143 | public function getNote() : float |
138 | 144 | { |
139 | - if (isset($this->data->vote_average)) { |
|
145 | + if (isset($this->data->vote_average)) |
|
146 | + { |
|
140 | 147 | return $this->data->vote_average; |
141 | 148 | } |
142 | 149 | return 0; |
@@ -148,7 +155,8 @@ discard block |
||
148 | 155 | */ |
149 | 156 | public function getNoteCount() : int |
150 | 157 | { |
151 | - if (isset($this->data->vote_count)) { |
|
158 | + if (isset($this->data->vote_count)) |
|
159 | + { |
|
152 | 160 | return (int) $this->data->vote_count; |
153 | 161 | } |
154 | 162 | return 0; |
@@ -160,7 +168,8 @@ discard block |
||
160 | 168 | */ |
161 | 169 | public function getOverview() : string |
162 | 170 | { |
163 | - if (isset($this->data->overview)) { |
|
171 | + if (isset($this->data->overview)) |
|
172 | + { |
|
164 | 173 | return $this->data->overview; |
165 | 174 | } |
166 | 175 | return ''; |
@@ -172,7 +181,8 @@ discard block |
||
172 | 181 | */ |
173 | 182 | public function getProductionCode() : string |
174 | 183 | { |
175 | - if (isset($this->data->production_code)) { |
|
184 | + if (isset($this->data->production_code)) |
|
185 | + { |
|
176 | 186 | return $this->data->production_code; |
177 | 187 | } |
178 | 188 | return ''; |
@@ -184,7 +194,8 @@ discard block |
||
184 | 194 | */ |
185 | 195 | public function getSeasonNumber() : int |
186 | 196 | { |
187 | - if (isset($this->data->season_number)) { |
|
197 | + if (isset($this->data->season_number)) |
|
198 | + { |
|
188 | 199 | return (int) $this->data->season_number; |
189 | 200 | } |
190 | 201 | return 0; |
@@ -196,7 +207,8 @@ discard block |
||
196 | 207 | */ |
197 | 208 | public function getStillPath() : string |
198 | 209 | { |
199 | - if (isset($this->data->still_path)) { |
|
210 | + if (isset($this->data->still_path)) |
|
211 | + { |
|
200 | 212 | return $this->data->still_path; |
201 | 213 | } |
202 | 214 | return ''; |
@@ -210,7 +222,8 @@ discard block |
||
210 | 222 | { |
211 | 223 | $data = $this->tmdb->getRequest('tv/' . $this->tv_id . '/season/' . $this->season_number . '/episode/' . $this->episode_number . '/images', $this->params); |
212 | 224 | |
213 | - foreach ($data->stills as $b) { |
|
225 | + foreach ($data->stills as $b) |
|
226 | + { |
|
214 | 227 | $image = new Results\Image($this->tmdb, $this->id, $b); |
215 | 228 | yield $image; |
216 | 229 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function __construct(TmdbInterface $tmdb, int $tv_id, int $season_number, int $episode_number, array $options = array()) |
60 | 60 | { |
61 | - parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number.'/episode'); |
|
61 | + parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number . '/episode'); |
|
62 | 62 | |
63 | 63 | $this->season_number = $season_number; |
64 | 64 | $this->episode_number = $episode_number; |
@@ -119,12 +119,14 @@ |
||
119 | 119 | */ |
120 | 120 | private function getImage(string $type, string $size, string $filepath) : string |
121 | 121 | { |
122 | - if (!isset($this->conf->images->base_url)) { |
|
122 | + if (!isset($this->conf->images->base_url)) |
|
123 | + { |
|
123 | 124 | $this->logger->error('No image base url found from configuration'); |
124 | 125 | throw new NotFoundException; |
125 | 126 | } |
126 | 127 | $sizes = $type . '_sizes'; |
127 | - if (!in_array($size, $this->conf->images->$sizes)) { |
|
128 | + if (!in_array($size, $this->conf->images->$sizes)) |
|
129 | + { |
|
128 | 130 | $this->logger->error('Incorrect param image size', array('type' => $type, 'size' => $size, 'filepath' => $filepath)); |
129 | 131 | throw new IncorrectParamException; |
130 | 132 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -82,7 +82,6 @@ |
||
82 | 82 | return $this->markAsFavorite('movie', $movie_id, true); |
83 | 83 | } |
84 | 84 | /** |
85 | - |
|
86 | 85 | * Unmark a movie as favorite |
87 | 86 | * @param int $movie_id Movie id |
88 | 87 | * @return Favorite |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $params['media_id'] = $media_id; |
63 | 63 | $params['favorite'] = $favorite; |
64 | 64 | |
65 | - $this->tmdb->postRequest('account/'.$this->account_id.'/favorite', $this->options, $params); |
|
65 | + $this->tmdb->postRequest('account/' . $this->account_id . '/favorite', $this->options, $params); |
|
66 | 66 | |
67 | 67 | return $this; |
68 | 68 | } catch (TmdbException $e) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | private function getAccountItems(string $item, string $result_class) : \Generator |
120 | 120 | { |
121 | - $response = $this->tmdb->getRequest('account/'.$this->account_id.'/favorite/'.$item, $this->options); |
|
121 | + $response = $this->tmdb->getRequest('account/' . $this->account_id . '/favorite/' . $item, $this->options); |
|
122 | 122 | |
123 | 123 | $this->page = (int) $response->page; |
124 | 124 | $this->total_pages = (int) $response->total_pages; |
@@ -56,7 +56,8 @@ discard block |
||
56 | 56 | */ |
57 | 57 | private function markAsFavorite(string $media_type, int $media_id, bool $favorite) : Favorite |
58 | 58 | { |
59 | - try { |
|
59 | + try |
|
60 | + { |
|
60 | 61 | $params = []; |
61 | 62 | $params['media_type'] = $media_type; |
62 | 63 | $params['media_id'] = $media_id; |
@@ -65,7 +66,9 @@ discard block |
||
65 | 66 | $this->tmdb->postRequest('account/'.$this->account_id.'/favorite', $this->options, $params); |
66 | 67 | |
67 | 68 | return $this; |
68 | - } catch (TmdbException $e) { |
|
69 | + } |
|
70 | + catch (TmdbException $e) |
|
71 | + { |
|
69 | 72 | throw $e; |
70 | 73 | } |
71 | 74 | } |