Code Duplication    Length = 9-10 lines in 2 locations

app/Model/Project/Issue/Comment/SendMessages.php 1 location

@@ 164-173 (lines=10) @@
161
     *
162
     * @return void
163
     */
164
    protected function populateData()
165
    {
166
        // Set the relation of assigned in issue object from the fetch data
167
        $this->issue->setRelation('assigned', $this->getUserById($this->issue->assigned_to));
168
        $creator = $this->getUserById($this->issue->created_by);
169
        if ($creator) {
170
            $this->issue->setRelation('user', $creator);
171
        }
172
        $this->loadIssueCreatorToProjectUsers();
173
    }
174
175
    /**
176
     * Check if the latest message is about deleting a comment.

app/Model/Project/Issue/SendMessages.php 1 location

@@ 242-250 (lines=9) @@
239
     *
240
     * @return void
241
     */
242
    protected function populateData()
243
    {
244
        $this->issue->setRelation('assigned', $this->getUserById($this->issue->assigned_to));
245
        $creator = $this->getUserById($this->issue->created_by);
246
        if ($creator) {
247
            $this->issue->setRelation('user', $creator);
248
        }
249
        $this->loadIssueCreatorToProjectUsers();
250
    }
251
252
    /**
253
     * Check if the latest message is about closing or reopening an issue.