• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aplus-framework / pagination / 5429062166

pending completion
5429062166

push

github

natanfelles
Add return types in user guide comments

585 of 585 relevant lines covered (100.0%)

6.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Views/bootstrap.php
1
<?php
2
/*
3
 * This file is part of Aplus Framework Pagination Library.
4
 *
5
 * (c) Natan Felles <natanfelles@gmail.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
/**
11
 * @var Framework\Pagination\Pager $pager
12
 */
13
$language = $pager->getLanguage();
1✔
14
?>
15
<ul class="pagination justify-content-center">
1✔
16
    <?php if ($pager->getCurrentPage() - $pager->getSurround() > 1) : ?>
1✔
17
        <li class="page-item">
1✔
18
            <a class="page-link" href="<?= $pager->getFirstPageUrl() ?>"><?= $pager->getLanguage()
1✔
19
        ->render('pagination', 'first') ?></a>
1✔
20
        </li>
21
    <?php endif ?>
22

23
    <?php if ($pager->getPreviousPage()) : ?>
1✔
24
        <li class="page-item">
1✔
25
            <a class="page-link" rel="prev" href="<?= $pager->getPreviousPageUrl() ?>" title="<?=
1✔
26
            $language->render('pagination', 'previous') ?>">&laquo;</a>
1✔
27
        </li>
28
    <?php endif ?>
29

30
    <?php foreach ($pager->getPreviousPagesUrls() as $p => $url) : ?>
1✔
31
        <li class="page-item">
1✔
32
            <a class="page-link" href="<?= $url ?>"><?= $p ?></a>
1✔
33
        </li>
34
    <?php endforeach ?>
35

36
    <li class="page-item active">
1✔
37
        <a class="page-link" rel="canonical" href="<?= $pager->getCurrentPageUrl() ?>">
1✔
38
            <?= $pager->getCurrentPage() ?>
1✔
39
        </a>
1✔
40
    </li>
41

42
    <?php foreach ($pager->getNextPagesUrls() as $p => $url) : ?>
1✔
43
        <li class="page-item">
1✔
44
            <a class="page-link" href="<?= $url ?>"><?= $p ?></a>
1✔
45
        </li>
46
    <?php endforeach ?>
47

48
    <?php if ($pager->getNextPage() && $pager->getNextPage() < $pager->getLastPage() + 1) : ?>
1✔
49
        <li class="page-item">
1✔
50
            <a class="page-link" rel="next" href="<?= $pager->getNextPageUrl() ?>" title="<?=
1✔
51
            $language->render('pagination', 'next') ?>">&raquo;</a>
1✔
52
        </li>
53
    <?php endif ?>
54

55
    <?php if ($pager->getLastPage()
1✔
56
        && $pager->getCurrentPage() + $pager->getSurround() < $pager->getLastPage()
1✔
57
    ) : ?>
58
        <li class="page-item">
1✔
59
            <a class="page-link" href="<?= $pager->getLastPageUrl() ?>"><?= $pager->getLanguage()
1✔
60
        ->render('pagination', 'last') ?></a>
1✔
61
        </li>
62
    <?php endif ?>
63
</ul>
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc