Code Duplication    Length = 14-14 lines in 4 locations

frontend/views/media-comment/comments.php 1 location

@@ 18-31 (lines=14) @@
15
16
?>
17
<div id="comment-view">
18
    <?php if ($media->comment_count): ?>
19
        <h2 class="comment-title">
20
            <?= Yii::t('writesdown', '{comment_count} {comment_word} on {title}', [
21
                'comment_count' => $media->comment_count,
22
                'comment_word' => $media->comment_count > 1 ? 'Replies' : 'Reply',
23
                'title' => $media->title,
24
            ]) ?>
25
26
        </h2>
27
28
        <?= MediaComment::widget(['model' => $media, 'id' => 'comments']) ?>
29
30
    <?php endif ?>
31
32
    <?php if ($media->comment_status == 'open'): ?>
33
        <?php $dateInterval = date_diff(new DateTime($media->date), new DateTime('now')) ?>
34
        <?php if (Option::get('comment_registration') && Yii::$app->user->isGuest): ?>

frontend/views/post-comment/comments.php 1 location

@@ 18-31 (lines=14) @@
15
?>
16
<div id="comment-view">
17
18
    <?php if ($post->comment_count): ?>
19
        <h2 class="comment-title">
20
            <?= Yii::t('writesdown', '{comment_count} {comment_word} on {title}', [
21
                'comment_count' => $post->comment_count,
22
                'comment_word' => $post->comment_count > 1 ? 'Replies' : 'Reply',
23
                'title' => $post->title,
24
            ]) ?>
25
26
        </h2>
27
28
        <?= PostComment::widget(['model' => $post, 'id' => 'comments']) ?>
29
30
    <?php endif ?>
31
32
    <?php if ($post->comment_status === 'open'): ?>
33
        <?php $dateInterval = date_diff(new DateTime($post->date), new DateTime('now')) ?>
34
        <?php if (Option::get('comment_registration') && Yii::$app->user->isGuest): ?>

themes/writesdown/media-comment/comments.php 1 location

@@ 19-32 (lines=14) @@
16
?>
17
<div id="comment-view">
18
19
    <?php if ($media->comment_count): ?>
20
        <h2 class="comment-title">
21
            <?= Yii::t('writesdown', '{comment_count} {comment_word} on {title}', [
22
                'comment_count' => $media->comment_count,
23
                'comment_word' => $media->comment_count > 1 ? 'Replies' : 'Reply',
24
                'title' => $media->title,
25
            ]) ?>
26
27
        </h2>
28
29
        <?= MediaComment::widget(['model' => $media, 'id' => 'comments']) ?>
30
31
    <?php endif ?>
32
33
    <?php if ($media->comment_status == 'open'): ?>
34
        <?php $dateInterval = date_diff(new DateTime($media->date), new DateTime('now')) ?>
35
        <?php if (Option::get('comment_registration') && Yii::$app->user->isGuest): ?>

themes/writesdown/post-comment/comments.php 1 location

@@ 17-30 (lines=14) @@
14
/* @var $comment common\models\MediaComment */
15
?>
16
<div id="comment-view">
17
    <?php if ($post->comment_count): ?>
18
        <h2 class="comment-title">
19
            <?= Yii::t('writesdown', '{comment_count} {comment_word} on {title}', [
20
                'comment_count' => $post->comment_count,
21
                'comment_word' => $post->comment_count > 1 ? 'Replies' : 'Reply',
22
                'title' => $post->title,
23
            ]) ?>
24
25
        </h2>
26
27
        <?= PostComment::widget(['model' => $post, 'id' => 'comments']) ?>
28
29
    <?php endif ?>
30
31
    <?php if ($post->comment_status == 'open'): ?>
32
        <?php $dateInterval = date_diff(new DateTime($post->date), new DateTime('now')) ?>
33
        <?php if (Option::get('comment_registration') && Yii::$app->user->isGuest): ?>