Completed
Push — master ( 4c06e8...e882df )
by ARCANEDEV
03:13
created

PaginationPresenter::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 12
cp 0
rs 9.4286
cc 2
eloc 8
nc 2
nop 1
crap 6
1
<?php namespace Arcanesoft\Foundation\Presenters;
2
3
use Illuminate\Pagination\BootstrapThreePresenter;
4
5
/**
6
 * Class     SmallBootstrapThreePresenter
7
 *
8
 * @package  Arcanesoft\Foundation\Presenters\Pagination
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class PaginationPresenter extends BootstrapThreePresenter
12
{
13
    /**
14
     * Convert the URL window into Bootstrap HTML.
15
     *
16
     * @param  string  $class
17
     *
18
     * @return string
19
     */
20
    public function render($class = 'pagination-sm m0')
21
    {
22
        if ($this->hasPages()) {
23
            return sprintf(
24
                '<ul class="pagination '. $class .'">%s %s %s</ul>',
25
                $this->getPreviousButton(),
26
                $this->getLinks(),
27
                $this->getNextButton()
28
            );
29
        }
30
31
        return '';
32
    }
33
}
34