Code Duplication    Length = 3-4 lines in 4 locations

src/FormElement.php 4 locations

@@ 120-123 (lines=4) @@
117
        }
118
119
        // Check if we receive a label that is false, so we don't display it
120
        if (isset($this->params['label']) && $this->params['label'] === false) {
121
            $this->label = false;
122
123
            return;
124
        }
125
126
        // Fallback: construct the label from the name
@@ 134-136 (lines=3) @@
131
132
    protected function setRequired()
133
    {
134
        if (isset($this->params['required']) && $this->params['required'] == true) {
135
            $this->required = true;
136
        }
137
    }
138
139
    protected function setDisabled()
@@ 141-143 (lines=3) @@
138
139
    protected function setDisabled()
140
    {
141
        if (isset($this->params['disabled']) && $this->params['disabled'] == true) {
142
            $this->disabled = true;
143
        }
144
    }
145
146
    protected function setReadonly()
@@ 148-150 (lines=3) @@
145
146
    protected function setReadonly()
147
    {
148
        if (isset($this->params['readonly']) && $this->params['readonly'] == true) {
149
            $this->readonly = true;
150
        }
151
    }
152
153
    protected function setValue()