Code Duplication    Length = 12-12 lines in 3 locations

src/intraface.dk/core/index.php 1 location

@@ 219-230 (lines=12) @@
216
    }
217
}
218
219
class Intraface_TemplateFactory extends k_DefaultTemplateFactory
220
{
221
    function create($filename)
222
    {
223
        $filename = $filename . '.tpl.php';
224
        $__template_filename__ = k_search_include_path($filename);
225
        if (!is_file($__template_filename__)) {
226
            throw new Exception("Failed opening '".$filename."' for inclusion. (include_path=".ini_get('include_path').")");
227
        }
228
        return new k_Template($__template_filename__);
229
    }
230
}
231
232
$components = new k_InjectorAdapter($bucket, new Intraface_Document);
233
$components->setImplementation('k_DefaultNotAuthorizedComponent', 'NotAuthorizedComponent');

src/intraface.dk/demo/index.php 1 location

@@ 71-82 (lines=12) @@
68
    }
69
}
70
71
class Demo_TemplateFactory extends k_DefaultTemplateFactory
72
{
73
    function create($filename)
74
    {
75
        $filename = $filename . '.tpl.php';
76
        $__template_filename__ = k_search_include_path($filename);
77
        if (!is_file($__template_filename__)) {
78
            throw new Exception("Failed opening '".$filename."' for inclusion. (include_path=".ini_get('include_path').")");
79
        }
80
        return new k_Template($__template_filename__);
81
    }
82
}
83
84
85
class Intraface_Demo_Factory

src/intraface.dk/tools/index.php 1 location

@@ 104-115 (lines=12) @@
101
}
102
103
104
class Tools_TemplateFactory extends k_DefaultTemplateFactory
105
{
106
    function create($filename)
107
    {
108
        $filename = $filename . '.tpl.php';
109
        $__template_filename__ = k_search_include_path($filename);
110
        if (!is_file($__template_filename__)) {
111
            throw new Exception("Failed opening '".$filename."' for inclusion. (include_path=".ini_get('include_path').")");
112
        }
113
        return new k_Template($__template_filename__);
114
    }
115
}
116
117
118
function create_container()