Code Duplication    Length = 20-21 lines in 2 locations

src/Chamilo/CoreBundle/Component/Editor/Editor.php 1 location

@@ 105-124 (lines=20) @@
102
    /**
103
     * @return string
104
     */
105
    public function editorReplace()
106
    {
107
        $toolbar = new Toolbar(
108
            $this->urlGenerator,
109
            $this->toolbarSet,
110
            $this->config
111
        );
112
113
        $toolbar->setLanguage($this->getLocale());
114
        $config = $toolbar->getConfig();
115
        $javascript = $this->toJavascript($config);
116
117
        $html = "<script>
118
           CKEDITOR.replace('".$this->name."',
119
               $javascript
120
           );
121
           
122
           </script>";
123
124
        return $html;
125
    }
126
127
    /**

src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php 1 location

@@ 97-117 (lines=21) @@
94
    /**
95
     * @return string
96
     */
97
    public function editorReplace()
98
    {
99
        $toolbar = new Toolbar\Basic(
100
            $this->urlGenerator,
101
            $this->toolbarSet,
102
            $this->config,
103
            'CkEditor'
104
        );
105
106
        $toolbar->setLanguage($this->getLocale());
107
        $config = $toolbar->getConfig();
108
109
        $javascript = $this->toJavascript($config);
110
111
        $html = "<script>
112
           CKEDITOR.replace('".$this->getName()."',
113
               $javascript
114
           );
115
           </script>";
116
117
        return $html;
118
    }
119
120
    /**