Code Duplication    Length = 13-18 lines in 2 locations

lib/ApiClient/AbstractApiClient.php 2 locations

@@ 113-125 (lines=13) @@
110
    /**
111
     * {@inheritdoc}
112
     */
113
    public function getCount($videoManagerId, VideosRequestParameters $parameters = null)
114
    {
115
        $options = [
116
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
117
        ];
118
119
        if ($parameters) {
120
            $options['query'] = $parameters->getContainer();
121
        }
122
123
        $response = $this->makeRequest('GET', 'videos', $options);
124
125
        return json_decode($response->getBody()->getContents(), true)['total'];
126
    }
127
128
    /**
@@ 208-225 (lines=18) @@
205
    /**
206
     * {@inheritdoc}
207
     */
208
    public function getVideo($videoManagerId, $videoId, VideoRequestParameters $parameters = null)
209
    {
210
        $options = [
211
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
212
        ];
213
214
        if ($parameters) {
215
            $options['query'] = $parameters->getContainer();
216
        }
217
218
        $response = $this->makeRequest(
219
            'GET',
220
            sprintf('videos/%s', $videoId),
221
            $options
222
        );
223
224
        return $this->deserialize($response->getBody()->getContents(), Video::class);
225
    }
226
}
227