Code Duplication    Length = 30-33 lines in 2 locations

frontend/views/post/view.php 1 location

@@ 45-77 (lines=33) @@
42
<div class="single post-view">
43
    <article class="hentry">
44
45
        <?php if (Yii::$app->controller->route !== 'site/index'): ?>
46
            <header class="entry-header page-header">
47
                <h1 class="entry-title"><?= Html::encode($post->title) ?></h1>
48
49
                <?php $updated = new \DateTime($post->modified, new DateTimeZone(Yii::$app->timeZone)) ?>
50
                <div class="entry-meta">
51
                    <span class="entry-date">
52
                        <span aria-hidden="true" class="glyphicon glyphicon-time"></span>
53
                        <a rel="bookmark" href="<?= $post->url ?>">
54
                            <time datetime="<?= $updated->format('c') ?>" class="entry-date">
55
                                <?= Yii::$app->formatter->asDate($post->date) ?>
56
                            </time>
57
                        </a>
58
                    </span>
59
                    <span class="byline">
60
                        <span class="author vcard">
61
                            <span aria-hidden="true" class="glyphicon glyphicon-user"></span>
62
                            <a rel="author" href="<?= $post->postAuthor->url ?>" class="url fn">
63
                                <?= $post->postAuthor->display_name ?>
64
                            </a>
65
                        </span>
66
                    </span>
67
                    <span class="comments-link">
68
                        <span aria-hidden="true" class="glyphicon glyphicon-comment"></span>
69
                        <a title="<?= Yii::t(
70
                            'writesdown', 'Comment on {postTitle}',
71
                            ['postTitle' => $post->title]
72
                        ) ?>" href="<?= $post->url ?>#respond"><?= Yii::t('writesdown', 'Leave a comment') ?></a>
73
                    </span>
74
                </div>
75
            </header>
76
        <?php endif ?>
77
78
        <div class="entry-content clearfix">
79
            <?= $post->content ?>
80
        </div>

themes/writesdown/post/view.php 1 location

@@ 67-96 (lines=30) @@
64
<div class="single post-view">
65
    <article class="hentry">
66
67
        <?php if (Yii::$app->controller->route !== 'site/index'): ?>
68
            <header class="entry-header">
69
                <h1 class="entry-title"><?= Html::encode($post->title) ?></h1>
70
71
                <?php $updated = new \DateTime($post->modified, new DateTimeZone(Yii::$app->timeZone)) ?>
72
                <div class="entry-meta">
73
                <span class="entry-date">
74
                    <a rel="bookmark" href="<?= $post->url ?>">
75
                        <time datetime="<?= $updated->format('c') ?>" class="entry-date">
76
                            <?= Yii::$app->formatter->asDate($post->date) ?>
77
                        </time>
78
                    </a>
79
                </span>
80
                <span class="byline">
81
                    <span class="author vcard">
82
                        <a rel="author" href="<?= $post->postAuthor->url ?>"
83
                           class="url fn"><?= $post->postAuthor->display_name ?>
84
                        </a>
85
                    </span>
86
                </span>
87
                <span class="comments-link">
88
                    <a title="<?= Yii::t(
89
                        'writesdown', 'Comment on {post}',
90
                        ['post' => $post->title]
91
                    ) ?>" href="<?= $post->url ?>#respond"><?= Yii::t('writesdown', 'Leave a comment') ?></a>
92
                </span>
93
                </div>
94
            </header>
95
        <?php endif ?>
96
97
        <div class="entry-content">
98
            <?= $post->content ?>
99