Code Duplication    Length = 9-9 lines in 2 locations

lib/Dwoo/Plugins/Functions/PluginInclude.php 1 location

@@ 57-65 (lines=9) @@
54
            return '';
55
        }
56
57
        if (preg_match('#^([a-z]{2,}):(.*)$#i', $file, $m)) {
58
            // resource:identifier given, extract them
59
            $resource   = $m[1];
60
            $identifier = $m[2];
61
        } else {
62
            // get the current template's resource
63
            $resource   = $this->core->getTemplate()->getResourceName();
64
            $identifier = $file;
65
        }
66
67
        try {
68
            $include = $this->core->templateFactory($resource, $identifier, $cache_time, $cache_id, $compile_id);

lib/Dwoo/Plugins/Functions/PluginLoadTemplates.php 1 location

@@ 49-57 (lines=9) @@
46
            return '';
47
        }
48
49
        if (preg_match('#^([a-z]{2,}):(.*)$#i', $file, $m)) {
50
            // resource:identifier given, extract them
51
            $resource   = $m[1];
52
            $identifier = $m[2];
53
        } else {
54
            // get the current template's resource
55
            $resource   = $compiler->getCore()->getTemplate()->getResourceName();
56
            $identifier = $file;
57
        }
58
59
        $tpl = $compiler->getCore()->templateFactory($resource, $identifier);
60