Code Duplication    Length = 6-6 lines in 2 locations

htdocs/class/xoopsform/form.php 2 locations

@@ 412-417 (lines=6) @@
409
            // will not use getElementByName() for performance..
410
            $elements = &$this->getElements(true);
411
            $count    = count($elements);
412
            for ($i = 0; $i < $count; ++$i) {
413
                $name = $elements[$i]->getName(false);
414
                if ($name && isset($values[$name]) && method_exists($elements[$i], 'setValue')) {
415
                    $elements[$i]->setValue($values[$name]);
416
                }
417
            }
418
        }
419
    }
420
@@ 450-455 (lines=6) @@
447
        $elements = &$this->getElements(true);
448
        $count    = count($elements);
449
        $values   = array();
450
        for ($i = 0; $i < $count; ++$i) {
451
            $name = $elements[$i]->getName(false);
452
            if ($name && method_exists($elements[$i], 'getValue')) {
453
                $values[$name] = &$elements[$i]->getValue($encode);
454
            }
455
        }
456
457
        return $values;
458
    }