Code Duplication    Length = 14-14 lines in 2 locations

src/View/ViewCollection.php 1 location

@@ 63-76 (lines=14) @@
60
     *
61
     * @return string as path to the template file
62
     */
63
    public function getTemplateFile($template)
64
    {
65
        $paths  = $this->config["path"];
66
        $suffix = $this->config["suffix"];
67
68
        foreach ($paths as $path) {
69
            $file = $path . "/" . $template . $suffix;
70
            if (is_file($file)) {
71
                return $file;
72
            }
73
        }
74
75
        throw new Exception("Could not find template file '$template'.");
76
    }
77
78
79

src/View/ViewContainer.php 1 location

@@ 31-44 (lines=14) @@
28
     *
29
     * @return string as path to the template file
30
     */
31
    public function getTemplateFile($template)
32
    {
33
        $paths  = $this->config["path"];
34
        $suffix = $this->config["suffix"];
35
36
        foreach ($paths as $path) {
37
            $file = $path . "/" . $template . $suffix;
38
            if (is_file($file)) {
39
                return $file;
40
            }
41
        }
42
43
        throw new Exception("Could not find template file '$template'.");
44
    }
45
46
47