Code Duplication    Length = 12-12 lines in 2 locations

app/Repository/Project/Issue/UpdaterRepository.php 1 location

@@ 333-344 (lines=12) @@
330
        $this->tags()->sync($tags->pluck('id')->all());
331
332
        // Activity is added when new issue create with tags or updated with tags excluding the open status tag
333
        if (!empty($removedTags) || !empty($addedTags)) {
334
            // Add this change to messages queue
335
            $this->queueChangeTags($this, $addedTags, $removedTags, $this->user);
336
337
            // Add to activity log for tags if changed
338
            $this->activities()->save(new User\Activity([
339
                'type_id'   => Activity::TYPE_ISSUE_TAG,
340
                'parent_id' => $this->project->id,
341
                'user_id'   => $this->user->id,
342
                'data'      => ['added_tags' => $addedTags, 'removed_tags' => $removedTags],
343
            ]));
344
        }
345
346
        return true;
347
    }

app/Repository/Traits/Project/Issue/CrudTagTrait.php 1 location

@@ 120-131 (lines=12) @@
117
        $this->tags()->sync($tags->pluck('id')->all());
118
119
        // Activity is added when new issue create with tags or updated with tags excluding the open status tag
120
        if (!empty($removedTags) || !empty($addedTags)) {
121
            // Add this change to messages queue
122
            $this->queueChangeTags($this, $addedTags, $removedTags, $this->user);
123
124
            // Add to activity log for tags if changed
125
            $this->activities()->save(new User\Activity([
126
                'type_id'   => Activity::TYPE_ISSUE_TAG,
127
                'parent_id' => $this->project->id,
128
                'user_id'   => $this->user->id,
129
                'data'      => ['added_tags' => $addedTags, 'removed_tags' => $removedTags],
130
            ]));
131
        }
132
133
        return true;
134
    }