Code Duplication    Length = 9-9 lines in 2 locations

src/Sioen/HtmlToJson/IframeConverter.php 2 locations

@@ 16-24 (lines=9) @@
13
        $html = $node->ownerDocument->saveXML($node);
14
15
        // youtube or vimeo
16
        if (preg_match('~//www.youtube.com/embed/([^/\?]+).*\"~si', $html, $matches)) {
17
            return new SirTrevorBlock(
18
                'video',
19
                array(
20
                    'source' => 'youtube',
21
                    'remote_id' => $matches[1],
22
                )
23
            );
24
        }
25
26
        if (preg_match('~//player.vimeo.com/video/([^/\?]+).*\?~si', $html, $matches)) {
27
            return new SirTrevorBlock(
@@ 26-34 (lines=9) @@
23
            );
24
        }
25
26
        if (preg_match('~//player.vimeo.com/video/([^/\?]+).*\?~si', $html, $matches)) {
27
            return new SirTrevorBlock(
28
                'video',
29
                array(
30
                    'source' => 'vimeo',
31
                    'remote_id' => $matches[1],
32
                )
33
            );
34
        }
35
    }
36
37
    public function matches(\DomElement $node)