Code Duplication    Length = 3-5 lines in 2 locations

src/Ffcms/Core/Helper/HTML/Form/MultiSelectField.php 2 locations

@@ 58-60 (lines=3) @@
55
            if ($optionsKey === true) {
56
                $optionProperty['value'] = $val;
57
                // check if current element is active
58
                if (Obj::isArray($this->value) && Arr::in((string)$val, $this->value)) {
59
                    $optionProperty['selected'] = 'selected';
60
                }
61
            } else {
62
                if (Obj::isArray($this->value) && Arr::in((string)$text, $this->value)) {
63
                    $optionProperty['selected'] = 'selected';
@@ 61-65 (lines=5) @@
58
                if (Obj::isArray($this->value) && Arr::in((string)$val, $this->value)) {
59
                    $optionProperty['selected'] = 'selected';
60
                }
61
            } else {
62
                if (Obj::isArray($this->value) && Arr::in((string)$text, $this->value)) {
63
                    $optionProperty['selected'] = 'selected';
64
                }
65
            }
66
            $optionsDOM .= self::buildContainerTag('option', $optionProperty, $text);
67
        }
68