Code Duplication    Length = 8-8 lines in 3 locations

src/Adapter/Dailymotion/DailymotionServiceAdapter.php 1 location

@@ 42-49 (lines=8) @@
39
     * @throws InvalidThumbnailSizeException
40
     * @throws \RicardoFiorani\Adapter\Exception\InvalidUrlException
41
     */
42
    public function getThumbnail(string $size, bool $forceSecure = false): string
43
    {
44
        if (false == in_array($size, $this->getThumbNailSizes())) {
45
            throw new InvalidThumbnailSizeException();
46
        }
47
48
        return $this->getScheme($forceSecure) . '://www.dailymotion.com/' . $size . '/video/' . $this->videoId;
49
    }
50
51
    /**
52
     * @throws InvalidThumbnailSizeException

src/Adapter/Facebook/FacebookServiceAdapter.php 1 location

@@ 38-45 (lines=8) @@
35
        return array(self::THUMBNAIL_SIZE_DEFAULT);
36
    }
37
38
    public function getThumbnail(string $size, bool $forceSecure = false): string
39
    {
40
        if (false == in_array($size, $this->getThumbNailSizes())) {
41
            throw new InvalidThumbnailSizeException();
42
        }
43
44
        return $this->getScheme($forceSecure) . '://graph.facebook.com/' . $this->getVideoId() . '/picture';
45
    }
46
47
    /**
48
     * @throws ThumbnailSizeNotAvailable

src/Adapter/Youtube/YoutubeServiceAdapter.php 1 location

@@ 44-51 (lines=8) @@
41
    /**
42
     * @throws InvalidThumbnailSizeException
43
     */
44
    public function getThumbnail(string $size, bool $forceSecure = false): string
45
    {
46
        if (false == in_array($size, $this->getThumbNailSizes())) {
47
            throw new InvalidThumbnailSizeException();
48
        }
49
50
        return $this->getScheme($forceSecure) . '://img.youtube.com/vi/' . $this->getVideoId() . '/' . $size . '.jpg';
51
    }
52
53
    public function getThumbNailSizes(): array
54
    {