Code Duplication    Length = 10-10 lines in 2 locations

src/Items/TVEpisode.php 1 location

@@ 219-228 (lines=10) @@
216
     * Image posters
217
     * @return \Generator|Results\Image
218
     */
219
    public function getPosters()
220
    {
221
        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/' . (int) $this->id . '/seasons/' . $this->season_number . '/episode/' . $this->episode_number . '/images', null, $this->params);
222
223
        foreach ($data->posters as $b)
224
        {
225
            $image = new Image($this->tmdb, $this->id, $b);
226
            yield $image;
227
        }
228
    }
229
230
}
231

src/Items/TVSeason.php 1 location

@@ 154-163 (lines=10) @@
151
     * Posters list
152
     * @return \Generator|Results\Image
153
     */
154
    public function getPosters()
155
    {
156
        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/' . (int) $this->id . '/seasons/' . $this->season_number . '/images', null, $this->params);
157
158
        foreach ($data->posters as $b)
159
        {
160
            $image = new Image($this->tmdb, $this->id, $b);
161
            yield $image;
162
        }
163
    }
164
165
}
166