Completed
Pull Request — master (#226)
by Romaric
08:06
created

TwitterBootstrap4Template::linkLi()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 4
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Pagerfanta package.
5
 *
6
 * (c) Pablo Díez <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Pagerfanta\View\Template;
13
14
/**
15
 * TwitterBootstrap4Template
16
 */
17
class TwitterBootstrap4Template extends TwitterBootstrap3Template
18
{
19 10
    protected function linkLi($class, $href, $text, $rel = null)
20
    {
21 10
        $liClass = implode(' ', array_filter(array('page-item', $class)));
22
23 10
        return sprintf('<li class="%s"><a class="page-link" href="%s"%s>%s</a></li>', $liClass, $href, $rel, $text);
24
    }
25
26 10
    protected function spanLi($class, $text)
27
    {
28 10
        $liClass = implode(' ', array_filter(array('page-item', $class)));
29
        
30 10
        return sprintf('<li class="%s"><span class="page-link">%s</span></li>', $liClass, $text);
31
    }
32
}
33