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

PaginationPresenter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 23
ccs 0
cts 12
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 13 2
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