Code Duplication    Length = 13-18 lines in 2 locations

lib/ApiClient/AbstractApiClient.php 2 locations

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