Code Duplication    Length = 13-18 lines in 2 locations

lib/ApiClient/AbstractApiClient.php 2 locations

@@ 89-101 (lines=13) @@
86
    /**
87
     * {@inheritdoc}
88
     */
89
    public function getCount($videoManagerId, VideosRequestParameters $parameters = null)
90
    {
91
        $options = [
92
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
93
        ];
94
95
        if ($parameters) {
96
            $options['query'] = $parameters->getContainer();
97
        }
98
99
        $response = $this->makeRequest('GET', 'videos', $options);
100
        return json_decode($response->getBody()->getContents(), true)['total'];
101
    }
102
103
    /**
104
     * {@inheritdoc}
@@ 183-200 (lines=18) @@
180
    /**
181
     * {@inheritdoc}
182
     */
183
    public function getVideo($videoManagerId, $videoId, VideoRequestParameters $parameters = null)
184
    {
185
        $options = [
186
            self::OPT_VIDEO_MANAGER_ID => $videoManagerId,
187
        ];
188
189
        if ($parameters) {
190
            $options['query'] = $parameters->getContainer();
191
        }
192
193
        $response = $this->makeRequest(
194
            'GET',
195
            sprintf('videos/%s', $videoId),
196
            $options
197
        );
198
199
        return $this->deserialize($response->getBody()->getContents(), Video::class);
200
    }
201
}
202