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

@@ 251-259 (lines=9) @@
248
     *
249
     * @return void
250
     */
251
    protected function populateData()
252
    {
253
        $this->issue->setRelation('assigned', $this->getUserById($this->issue->assigned_to));
254
        $creator = $this->getUserById($this->issue->created_by);
255
        if ($creator) {
256
            $this->issue->setRelation('user', $creator);
257
        }
258
        $this->loadIssueCreatorToProjectUsers();
259
    }
260
261
    /**
262
     * Check if the latest message is about closing or reopening an issue.