Code Duplication    Length = 5-5 lines in 2 locations

htdocs/modules/profile/class/field.php 2 locations

@@ 61-65 (lines=5) @@
58
     */
59
    public function setVar($key, $value, $not_gpc = false)
60
    {
61
        if ($key === 'field_options' && is_array($value)) {
62
            foreach (array_keys($value) as $idx) {
63
                $value[$idx] = base64_encode($value[$idx]);
64
            }
65
        }
66
        parent::setVar($key, $value, $not_gpc);
67
    }
68
@@ 78-82 (lines=5) @@
75
    public function getVar($key, $format = 's')
76
    {
77
        $value = parent::getVar($key, $format);
78
        if ($key === 'field_options' && !empty($value)) {
79
            foreach (array_keys($value) as $idx) {
80
                $value[$idx] = base64_decode($value[$idx]);
81
            }
82
        }
83
84
        return $value;
85
    }