Code Duplication    Length = 13-18 lines in 2 locations

lib/ApiClient/AbstractApiClient.php 2 locations

@@ 121-133 (lines=13) @@
118
    /**
119
     * {@inheritdoc}
120
     */
121
    public function getCount($videoManagerId, VideosRequestParameters $parameters = null)
122
    {
123
        $options = [
124
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
125
        ];
126
127
        if ($parameters) {
128
            $options['query'] = $parameters->getContainer();
129
        }
130
131
        $response = $this->makeRequest('GET', 'videos', $options);
132
133
        return json_decode($response->getBody()->getContents(), true)['total'];
134
    }
135
136
    /**
@@ 222-239 (lines=18) @@
219
    /**
220
     * {@inheritdoc}
221
     */
222
    public function getVideo($videoManagerId, $videoId, VideoRequestParameters $parameters = null)
223
    {
224
        $options = [
225
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
226
        ];
227
228
        if ($parameters) {
229
            $options['query'] = $parameters->getContainer();
230
        }
231
232
        $response = $this->makeRequest(
233
            'GET',
234
            sprintf('videos/%s', $videoId),
235
            $options
236
        );
237
238
        return $this->deserialize($response->getBody()->getContents(), Video::class);
239
    }
240
241
    /**
242
     * {@inheritdoc}