Paginator::render()   A
last analyzed

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 0
Metric Value
cc 2
eloc 8
nc 2
nop 0
dl 0
loc 13
ccs 0
cts 9
cp 0
crap 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Anavel\Crud\View\Presenters;
4
5
use Illuminate\Pagination\BootstrapThreePresenter;
6
7
class Paginator extends BootstrapThreePresenter
8
{
9
    /**
10
     * Convert the URL window into Bootstrap HTML.
11
     *
12
     * @return string
13
     */
14
    public function render()
15
    {
16
        if ($this->hasPages()) {
17
            return sprintf(
18
                '<ul class="pagination no-margin pull-right">%s %s %s</ul>',
19
                $this->getPreviousButton(),
20
                $this->getLinks(),
21
                $this->getNextButton()
22
            );
23
        }
24
25
        return '';
26
    }
27
}
28