Code Duplication    Length = 12-12 lines in 2 locations

app/Helpers/TaskHelper.php 2 locations

@@ 201-212 (lines=12) @@
198
     *
199
     * @return string
200
     */
201
    public function selectCategory(array $categories, array $values, array $errors = [], array $attributes = [], $allow_one_item = false)
202
    {
203
        $attributes = array_merge(['tabindex="4"'], $attributes);
204
        $html = '';
205
206
        if (!(!$allow_one_item && count($categories) === 1 && key($categories) == 0)) {
207
            $html .= $this->helper->form->label(t('Category'), 'category_id');
208
            $html .= $this->helper->form->select('category_id', $categories, $values, $errors, $attributes);
209
        }
210
211
        return $html;
212
    }
213
214
    /**
215
     * Display a select field of swimlane.
@@ 224-235 (lines=12) @@
221
     *
222
     * @return string
223
     */
224
    public function selectSwimlane(array $swimlanes, array $values, array $errors = [], array $attributes = [])
225
    {
226
        $attributes = array_merge(['tabindex="5"'], $attributes);
227
        $html = '';
228
229
        if (!(count($swimlanes) === 1 && key($swimlanes) == 0)) {
230
            $html .= $this->helper->form->label(t('Swimlane'), 'swimlane_id');
231
            $html .= $this->helper->form->select('swimlane_id', $swimlanes, $values, $errors, $attributes);
232
        }
233
234
        return $html;
235
    }
236
237
    /**
238
     * Display a select field of column.