Code Duplication    Length = 7-7 lines in 2 locations

code/utilities/BlocksUtility.php 2 locations

@@ 33-39 (lines=7) @@
30
     */
31
    public static function parse_video_id($url, $provider = 'youtube') {
32
        switch (strtolower($provider)) {
33
            case 'youtube':
34
35
                if (preg_match(static::config()->patterns['youtube'], $url, $matches)) {
36
                    return $matches[1];
37
                }
38
39
                break;
40
41
            case 'vimeo':
42
@@ 41-47 (lines=7) @@
38
39
                break;
40
41
            case 'vimeo':
42
43
                if (preg_match(static::config()->patterns['vimeo'], $url, $matches)) {
44
                    return $matches[3];
45
                }
46
47
                break;
48
        }
49
50
        throw new ProviderNotFound('Provider not found when parsing video id by given url');