Code Duplication    Length = 3-4 lines in 4 locations

src/FormElement.php 4 locations

@@ 129-132 (lines=4) @@
126
        }
127
128
        // Check if we receive a label that is false, so we don't display it
129
        if (isset($this->params['label']) && $this->params['label'] === false) {
130
            $this->label = false;
131
132
            return;
133
        }
134
135
        // Fallback: construct the label from the name
@@ 143-145 (lines=3) @@
140
141
    protected function setRequired()
142
    {
143
        if (isset($this->params['required']) && $this->params['required'] == true) {
144
            $this->required = true;
145
        }
146
    }
147
148
    protected function setDisabled()
@@ 150-152 (lines=3) @@
147
148
    protected function setDisabled()
149
    {
150
        if (isset($this->params['disabled']) && $this->params['disabled'] == true) {
151
            $this->disabled = true;
152
        }
153
    }
154
155
    protected function setReadonly()
@@ 157-159 (lines=3) @@
154
155
    protected function setReadonly()
156
    {
157
        if (isset($this->params['readonly']) && $this->params['readonly'] == true) {
158
            $this->readonly = true;
159
        }
160
    }
161
162
    protected function setValue()