Code Duplication    Length = 3-4 lines in 4 locations

src/FormElement.php 4 locations

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