Code Duplication    Length = 6-6 lines in 2 locations

polls.php 2 locations

@@ 417-422 (lines=6) @@
414
                            xoops_error($xpLogHandler->getHtmlErrors());
415
                            break;
416
                        }
417
                    } else {
418
                        $optionObject->setVar('option_text', $optionTextArray[$key]);
419
                        $optionObject->setVar('option_color', $optionColorArray[$key]);
420
                        $optionObject->setVar('poll_id', $poll_id);
421
                        $xpOptHandler->insert($optionObject);
422
                    }
423
                } else {
424
                    // new option object
425
                    $optionObject            = $xpOptHandler->create();
@@ 427-432 (lines=6) @@
424
                    // new option object
425
                    $optionObject            = $xpOptHandler->create();
426
                    $optionTextArray[$key] = trim($optionTextArray[$key]);
427
                    if ('' !== $optionTextArray[$key]) { // ignore if text is empty
428
                        $optionObject->setVar('option_text', $optionTextArray[$key]);
429
                        $optionObject->setVar('option_color', $optionColorArray[$key]);
430
                        $optionObject->setVar('poll_id', $poll_id);
431
                        $xpOptHandler->insert($optionObject);
432
                    }
433
                    unset($optionObject);
434
                }
435
            }