Code Duplication    Length = 4-4 lines in 4 locations

application/modules/comments/comments.php 1 location

@@ 299-302 (lines=4) @@
296
                 'item_id'            => $item_id,
297
                ];
298
299
        if ($this->use_captcha == TRUE) {
300
            $this->dx_auth->captcha();
301
            $data['cap_image'] = $this->dx_auth->get_captcha_image();
302
        }
303
304
        ($hook = get_hook('comments_read_com_tpl')) ? eval($hook) : NULL;
305

application/modules/comments/commentsapi.php 3 locations

@@ 72-75 (lines=4) @@
69
                 'enable_comments'    => $this->enable_comments,
70
                ];
71
72
        if ($this->use_captcha == TRUE) {
73
            $this->dx_auth->captcha();
74
            $data['cap_image'] = $this->dx_auth->get_captcha_image();
75
        }
76
        return $data;
77
    }
78
@@ 129-132 (lines=4) @@
126
                 'enable_comments'    => $this->enable_comments,
127
                ];
128
129
        if ($this->use_captcha == TRUE) {
130
            $this->dx_auth->captcha();
131
            $data['cap_image'] = $this->dx_auth->get_captcha_image();
132
        }
133
        ($hook = get_hook('comments_read_com_tpl')) ? eval($hook) : NULL;
134
135
        $comments = $this->_fetchComments($data);
@@ 191-194 (lines=4) @@
188
                 'visibleMainForm'    => $this->input->post('visibleMainForm'),
189
                ];
190
191
        if ($this->use_captcha == TRUE && !$this->dx_auth->is_admin()) {
192
            $this->dx_auth->captcha();
193
            $data['cap_image'] = $this->dx_auth->get_captcha_image();
194
        }
195
        ($hook = get_hook('comments_read_com_tpl')) ? eval($hook) : NULL;
196
197
        $comments = $this->_fetchComments($data);