Code Duplication    Length = 3-4 lines in 4 locations

src/FormElement.php 4 locations

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