Code Duplication    Length = 3-5 lines in 2 locations

lib/Ajde/Template.php 2 locations

@@ 86-90 (lines=5) @@
83
                    $filePattern = $fileNamePattern.'.'.$fileType;
84
                    if (!substr_count($prefixedBase, DIRECTORY_SEPARATOR.'layout'.DIRECTORY_SEPARATOR)) {
85
                        $layoutDir = 'layout.'.Ajde::app()->getDocument()->getLayout()->getName().DIRECTORY_SEPARATOR;
86
                        if ($fileMatch = Ajde_Fs_Find::findFile($prefixedBase.TEMPLATE_DIR.$layoutDir,
87
                            $filePattern)
88
                        ) {
89
                            return ['filename' => $fileMatch, 'parser' => $parserType];
90
                        }
91
                    }
92
                    if ($fileMatch = Ajde_Fs_Find::findFile($prefixedBase.TEMPLATE_DIR, $filePattern)) {
93
                        return ['filename' => $fileMatch, 'parser' => $parserType];
@@ 92-94 (lines=3) @@
89
                            return ['filename' => $fileMatch, 'parser' => $parserType];
90
                        }
91
                    }
92
                    if ($fileMatch = Ajde_Fs_Find::findFile($prefixedBase.TEMPLATE_DIR, $filePattern)) {
93
                        return ['filename' => $fileMatch, 'parser' => $parserType];
94
                    }
95
                }
96
            }
97
        }