Code Duplication    Length = 29-29 lines in 2 locations

Apps/View/Front/default/profile/index.php 1 location

@@ 42-70 (lines=29) @@
39
    }
40
?>
41
42
<?php foreach ($records as $profile) :?>
43
    <div class="row" style="padding-top: 10px">
44
        <div class="col-md-2">
45
            <div class="text-center"><img src="<?= $profile->getAvatarUrl('small') ?>" class="img-responsive img-circle img-thumbnail"/></div>
46
        </div>
47
        <div class="col-md-8">
48
            <h3>
49
                <?= Url::link(['profile/show', $profile->user_id], Str::likeEmpty($profile->nick) ? __('No name') : $profile->nick) ?>
50
            </h3>
51
            <p><?= __('Registered') ?>: <?= Date::convertToDatetime($profile->created_at, Date::FORMAT_TO_DAY) ?></p>
52
        </div>
53
        <div class="col-md-2">
54
            <h3 class="pull-right">
55
                <?php
56
                    $markLabel = 'badge';
57
                    if ($profile->rating > 0) {
58
                        $markLabel = 'alert-success';
59
                    } elseif ($profile->rating < 0) {
60
                        $markLabel = 'alert-danger';
61
                    }
62
                ?>
63
                <span class="label <?= $markLabel ?>">
64
                    <?= $profile->rating > 0 ? '+' : null ?><?= $profile->rating ?>
65
                </span>
66
            </h3>
67
        </div>
68
    </div>
69
    <hr/>
70
<?php endforeach; ?>
71
72
73
<div class="text-center">

Apps/View/Front/default/profile/search.php 1 location

@@ 44-72 (lines=29) @@
41
    return;
42
}
43
?>
44
<?php foreach ($records as $profile) :?>
45
    <div class="row" style="padding-top: 10px;">
46
        <div class="col-md-2">
47
            <div class="text-center"><img src="<?= $profile->getAvatarUrl('small') ?>" class="img-responsive img-circle img-thumbnail"/></div>
48
        </div>
49
        <div class="col-md-8">
50
            <h3>
51
                <?= Url::link(['profile/show', $profile->user_id], Str::likeEmpty($profile->nick) ? __('No name') : $profile->nick) ?>
52
            </h3>
53
            <p><?= __('Registered') ?>: <?= Date::convertToDatetime($profile->created_at, Date::FORMAT_TO_DAY) ?></p>
54
        </div>
55
        <div class="col-md-2">
56
            <h3 class="pull-right">
57
                <?php
58
                $markLabel = 'badge';
59
                if ($profile->rating > 0) {
60
                    $markLabel = 'alert-success';
61
                } elseif ($profile->rating < 0) {
62
                    $markLabel = 'alert-danger';
63
                }
64
                ?>
65
                <span class="label <?= $markLabel ?>">
66
                    <?= $profile->rating > 0 ? '+' : null ?><?= $profile->rating ?>
67
                </span>
68
            </h3>
69
        </div>
70
    </div>
71
    <hr/>
72
<?php endforeach; ?>
73
<div class="text-center">
74
    <?= $pagination->display(['class' => 'pagination pagination-centered']) ?>
75
</div>