Code Duplication    Length = 9-9 lines in 3 locations

application/modules/CMSFactory/assetManager.php 3 locations

@@ 144-152 (lines=9) @@
141
     * @author Kaero
142
     * @copyright ImageCMS (c) 2013, Kaero <[email protected]>
143
     */
144
    public function fetchTemplate($tpl, $moduleName = null) {
145
        try {
146
            /** Start. Return template file */
147
            return CI_Controller::get_instance()->template->fetch('file:' . $this->_buildTemplatePath($tpl, $moduleName));
148
        } catch (Exception $exc) {
149
            log_message('error', $exc->getMessage());
150
            show_error($exc->getMessage(), 500, 'An Template Error Was Encountered');
151
        }
152
    }
153
154
    /**
155
     * @param string $item
@@ 611-619 (lines=9) @@
608
     * @param string $mainLayout
609
     * @return assetManager
610
     */
611
    public function setMainLayout($mainLayout) {
612
        try {
613
            CI_Controller::get_instance()->template->set_main_layout($mainLayout);
614
        } catch (Exception $exc) {
615
            log_message('error', $exc->getMessage());
616
            show_error($exc->getMessage(), 500, 'An Template Error Was Encountered');
617
        }
618
        return $this;
619
    }
620
621
    /**
622
     * Changing main layout file by full path
@@ 626-634 (lines=9) @@
623
     * @param string $mainLayout
624
     * @return assetManager
625
     */
626
    public function setMainLayoutByFullPath($mainLayout) {
627
        try {
628
            CI_Controller::get_instance()->template->set_main_layout_by_full_path($mainLayout);
629
        } catch (Exception $exc) {
630
            log_message('error', $exc->getMessage());
631
            show_error($exc->getMessage(), 500, 'An Template Error Was Encountered');
632
        }
633
        return $this;
634
    }
635
636
}