Code Duplication    Length = 3-3 lines in 4 locations

src/Ffcms/Core/Helper/HTML/Form/MultiCheckboxField.php 1 location

@@ 46-48 (lines=3) @@
43
    {
44
        // check if options is defined
45
        $options = $this->properties['options'];
46
        if (!Obj::isIterable($options)) {
47
            throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable');
48
        }
49
        unset($this->properties['options']);
50
        
51
        // set field type

src/Ffcms/Core/Helper/HTML/Form/MultiSelectField.php 1 location

@@ 38-40 (lines=3) @@
35
        // check if options is defined
36
        $options = $this->properties['options'];
37
        $optionsKey = (bool)$this->properties['optionsKey'];
38
        if (!Obj::isIterable($options)) {
39
            throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable');
40
        }
41
        unset($this->properties['options']);
42
        
43
        // set global field type

src/Ffcms/Core/Helper/HTML/Form/RadioField.php 1 location

@@ 43-45 (lines=3) @@
40
    {
41
        // get options from properties
42
        $options = $this->properties['options'];
43
        if (!Obj::isIterable($options)) {
44
            throw new SyntaxException('Radio field ' . self::nohtml($this->name) . ' have no iterable options');
45
        }
46
        unset($this->properties['options'], $this->properties['value']);
47
48
        // options is defined as key->value array?

src/Ffcms/Core/Helper/HTML/Form/SelectField.php 1 location

@@ 37-39 (lines=3) @@
34
        // get options from properties
35
        $options = $this->properties['options'];
36
        unset($this->properties['options']);
37
        if (!Obj::isIterable($options)) {
38
            throw new SyntaxException('Select field ' . self::nohtml($this->name) . ' have no iterable options');
39
        }
40
        // value is not used there
41
        unset($this->properties['value']);
42
        // options is defined as key->value array?