Code Duplication    Length = 12-12 lines in 2 locations

class/Accounts.php 2 locations

@@ 146-157 (lines=12) @@
143
            $form->addElement(new \XoopsFormText(_AM_XNEWSLETTER_ACCOUNTS_PASSWORD, 'accounts_password', 50, 255, $this->getVar('accounts_password')), true);
144
        }
145
146
        if (false === $dis_accounts_server_in) {
147
            $incomming_tray = new \XoopsFormElementTray(_AM_XNEWSLETTER_ACCOUNTS_INCOMING, '');
148
            $incomming_tray->addElement(new \XoopsFormText(_AM_XNEWSLETTER_ACCOUNTS_SERVER_IN, 'accounts_server_in', 50, 255, $this->getVar('accounts_server_in')));
149
            $incomming_tray->addElement(new \XoopsFormText('<br>' . _AM_XNEWSLETTER_ACCOUNTS_PORT_IN, 'accounts_port_in', 50, 255, $this->getVar('accounts_port_in')));
150
            $formfield_securetype_in = new \XoopsFormSelect('<br>' . _AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_IN, 'accounts_securetype_in', $this->getVar('accounts_securetype_in'));
151
            $formfield_securetype_in->addOption('', '');
152
            $formfield_securetype_in->addOption('notls', 'NOTLS / STARTTLS');
153
            $formfield_securetype_in->addOption('ssl', 'SSL');
154
            $formfield_securetype_in->addOption('tls', 'TLS');
155
            $incomming_tray->addElement($formfield_securetype_in);
156
            $form->addElement($incomming_tray);
157
        }
158
159
        if (false === $dis_accounts_server_out) {
160
            $outcomming_tray = new \XoopsFormElementTray(_AM_XNEWSLETTER_ACCOUNTS_OUTGOING, '');
@@ 159-170 (lines=12) @@
156
            $form->addElement($incomming_tray);
157
        }
158
159
        if (false === $dis_accounts_server_out) {
160
            $outcomming_tray = new \XoopsFormElementTray(_AM_XNEWSLETTER_ACCOUNTS_OUTGOING, '');
161
            $outcomming_tray->addElement(new \XoopsFormText(_AM_XNEWSLETTER_ACCOUNTS_SERVER_OUT, 'accounts_server_out', 50, 255, $this->getVar('accounts_server_out')));
162
            $outcomming_tray->addElement(new \XoopsFormText('<br>' . _AM_XNEWSLETTER_ACCOUNTS_PORT_OUT, 'accounts_port_out', 50, 255, $this->getVar('accounts_port_out')));
163
            $formfield_securetype_out = new \XoopsFormSelect('<br>' . _AM_XNEWSLETTER_ACCOUNTS_SECURETYPE_OUT, 'accounts_securetype_out', $this->getVar('accounts_securetype_out'));
164
            $formfield_securetype_out->addOption('', '');
165
            $formfield_securetype_out->addOption('notls', 'NOTLS / STARTTLS');
166
            $formfield_securetype_out->addOption('ssl', 'SSL');
167
            $formfield_securetype_out->addOption('tls', 'TLS');
168
            $outcomming_tray->addElement($formfield_securetype_out);
169
            $form->addElement($outcomming_tray);
170
        }
171
172
        if (false === $dis_accounts_use_bmh) {
173
            $form->addElement(new \XoopsFormLabel('', _AM_XNEWSLETTER_ACCOUNTS_BOUNCE_INFO));