Code Duplication    Length = 7-7 lines in 2 locations

src/Command/GenerateCommand.php 2 locations

@@ 275-281 (lines=7) @@
272
273
            $msg .= $topic->getCreatedTime()->getTimeStamp().'|'.($name).'|A|'.'/'.$count.'/'.$topic->getId().'/'.$topicTitle.".Topics\n";
274
        }
275
        foreach ($comments as $comment) {
276
            $commentMessage = substr($comment->getMessage(), 0, 30);
277
            $commentMessage = trim(preg_replace('/\s\s+/', ' ', $commentMessage));
278
            $commentMessage = sha1($commentMessage);
279
280
            $msg .= $comment->getCreatedTime()->getTimeStamp().'|'.$comment->getUser()->getName().'|A|'.'/'.$count.'/'.$comment->getTopicId().'/'.$comment->getId().'/'.$commentMessage.".Comments\n";
281
        }
282
        foreach($replies as $reply) {
283
            $replyMessage = substr($reply->getMessage(), 0, 30);
284
            $replyMessage = trim(preg_replace('/\s\s+/', ' ', $replyMessage));
@@ 282-288 (lines=7) @@
279
280
            $msg .= $comment->getCreatedTime()->getTimeStamp().'|'.$comment->getUser()->getName().'|A|'.'/'.$count.'/'.$comment->getTopicId().'/'.$comment->getId().'/'.$commentMessage.".Comments\n";
281
        }
282
        foreach($replies as $reply) {
283
            $replyMessage = substr($reply->getMessage(), 0, 30);
284
            $replyMessage = trim(preg_replace('/\s\s+/', ' ', $replyMessage));
285
            $replyMessage = sha1($replyMessage);
286
287
            $msg .= $reply->getCreatedTime()->getTimeStamp().'|'.$reply->getUser()->getName().'|A|'.'/'.$count.'/'.$reply->getTopicId().'/'.$reply->getCommentId().'/'.$reply->getId().'/'.$replyMessage.".Replies\n";
288
        }
289
290
        file_put_contents($this->reportsDir.'/../gource.log', $msg, FILE_APPEND | LOCK_EX);
291