Code Duplication    Length = 7-7 lines in 2 locations

app/Form/Project.php 1 location

@@ 98-104 (lines=7) @@
95
        if ($this->isEditing()) {
96
            $selectTags = $this->getModel()->kanbanTags()->get()->filter(function (TagModel $tag) {
97
                return !($tag->name == TagModel::STATUS_OPEN || $tag->name == TagModel::STATUS_CLOSED);
98
            })->map(function (TagModel $tag) {
99
                return [
100
                    'value'   => $tag->id,
101
                    'label'   => ($tag->fullname),
102
                    'bgcolor' => $tag->bgcolor,
103
                ];
104
            })->toJson();
105
        } else {
106
            $selectTags = (new TagModel())->tagsToJson(\Request::input('tags'));
107
        }

app/Http/Controllers/Administration/TagsController.php 1 location

@@ 120-126 (lines=7) @@
117
        if (!empty($term)) {
118
            $tags = $tag->searchTags($term)->filter(function (Tag $tag) {
119
                return !($tag->name == 'open' || $tag->name == 'closed');
120
            })->map(function (Tag $tag) {
121
                return [
122
                    'value'   => $tag->id,
123
                    'label'   => $tag->fullname,
124
                    'bgcolor' => $tag->bgcolor,
125
                ];
126
            })->toArray();
127
        }
128
129
        return response()->json($tags);