Code Duplication    Length = 4-4 lines in 4 locations

class/Form.php 2 locations

@@ 252-255 (lines=4) @@
249
                   . '<br><br>'
250
                   . _SMALLWORLD_START . '<select class="schooltime" name="schoolstart[]" id="schoolstart">';
251
        $array    = SmallworldGetTimestampsToForm();
252
        foreach ($array as $key => $option) {
253
            $selectstart = $selectedstart == $key ? ' selected="selected"' : null;
254
            $dropdown    .= '<option value="' . $key . '"' . $selectstart . '>' . $option . '</option>' . '<br>';
255
        }
256
        $dropdown .= '</select>'
257
                   . '<br><br>'
258
                   . _SMALLWORLD_STOP . '<select class="schooltime" name="schoolstop[]" id="schoolstop">';
@@ 260-263 (lines=4) @@
257
                   . '<br><br>'
258
                   . _SMALLWORLD_STOP . '<select class="schooltime" name="schoolstop[]" id="schoolstop">';
259
        $array    = SmallworldGetTimestampsToForm();
260
        foreach ($array as $key => $option) {
261
            $selectstop = $selectedstop == $key ? ' selected="selected"' : null;
262
            $dropdown   .= '<option value="' . $key . '"' . $selectstop . '>' . $option . '</option>' . '<br>';
263
        }
264
        $dropdown .= '</select><br></p></div>';
265
266
        return $dropdown;

class/SmallWorldForm.php 2 locations

@@ 215-218 (lines=4) @@
212
        $dropdown .= '<br><br>';
213
        $dropdown .= _SMALLWORLD_START . '<select class="schooltime" name="schoolstart[]" id="schoolstart">';
214
        $array    = SmallworldGetTimestampsToForm();
215
        foreach ($array as $key => $option) {
216
            $selectstart = $selectedstart == $key ? ' selected="selected"' : null;
217
            $dropdown    .= '<option value="' . $key . '"' . $selectstart . '>' . $option . '</option>' . '<br>';
218
        }
219
        $dropdown .= '</select>';
220
        $dropdown .= '<br><br>';
221
        $dropdown .= _SMALLWORLD_STOP . '<select class="schooltime" name="schoolstop[]" id="schoolstop">';
@@ 223-226 (lines=4) @@
220
        $dropdown .= '<br><br>';
221
        $dropdown .= _SMALLWORLD_STOP . '<select class="schooltime" name="schoolstop[]" id="schoolstop">';
222
        $array    = SmallworldGetTimestampsToForm();
223
        foreach ($array as $key => $option) {
224
            $selectstop = $selectedstop == $key ? ' selected="selected"' : null;
225
            $dropdown   .= '<option value="' . $key . '"' . $selectstop . '>' . $option . '</option>' . '<br>';
226
        }
227
        $dropdown .= '</select><br></p></div>';
228
        return $dropdown;
229
    }