Code Duplication    Length = 6-6 lines in 3 locations

class/Utility.php 3 locations

@@ 887-892 (lines=6) @@
884
885
        // Only for Xoops 2.0.x
886
        switch ($editor_option) {
887
            case 'fckeditor':
888
                if (is_readable(XOOPS_ROOT_PATH . '/class/fckeditor/formfckeditor.php')) {
889
                    require_once XOOPS_ROOT_PATH . '/class/fckeditor/formfckeditor.php';
890
                    $editor = new XoopsFormFckeditor($caption, $name, $value);
891
                }
892
                break;
893
894
            case 'htmlarea':
895
                if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
@@ 894-899 (lines=6) @@
891
                }
892
                break;
893
894
            case 'htmlarea':
895
                if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
896
                    require_once XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php';
897
                    $editor = new XoopsFormHtmlarea($caption, $name, $value);
898
                }
899
                break;
900
901
            case 'dhtmltextarea':
902
            case 'dhtml':
@@ 924-929 (lines=6) @@
921
                }
922
                break;
923
924
            case 'koivi':
925
                if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) {
926
                    require_once XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php';
927
                    $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, $width, $height, '');
928
                }
929
                break;
930
        }
931
932
    return $editor;