Code Duplication    Length = 13-18 lines in 2 locations

lib/ApiClient/AbstractApiClient.php 2 locations

@@ 123-135 (lines=13) @@
120
    /**
121
     * {@inheritdoc}
122
     */
123
    public function getCount($videoManagerId, VideosRequestParameters $parameters = null)
124
    {
125
        $options = [
126
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
127
        ];
128
129
        if ($parameters) {
130
            $options['query'] = $parameters->getContainer();
131
        }
132
133
        $response = $this->makeRequest('GET', 'videos', $options);
134
135
        return json_decode($response->getBody()->getContents(), true)['total'];
136
    }
137
138
    /**
@@ 238-255 (lines=18) @@
235
    /**
236
     * {@inheritdoc}
237
     */
238
    public function getVideo($videoManagerId, $videoId, VideoRequestParameters $parameters = null)
239
    {
240
        $options = [
241
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
242
        ];
243
244
        if ($parameters) {
245
            $options['query'] = $parameters->getContainer();
246
        }
247
248
        $response = $this->makeRequest(
249
            'GET',
250
            sprintf('videos/%s', $videoId),
251
            $options
252
        );
253
254
        return $this->deserialize($response->getBody()->getContents(), Video::class);
255
    }
256
257
    /**
258
     * {@inheritdoc}