Code Duplication    Length = 12-12 lines in 2 locations

class/Accounts.php 2 locations

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