CurrentPage   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 20
ccs 10
cts 10
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setData() 0 5 1
A fillInputs() 0 4 1
A templatePath() 0 3 1
1
<?php
2
3
namespace kalanis\kw_paging\Render\SimplifiedPager;
4
5
6
use kalanis\kw_paging\Interfaces\ILink;
7
use kalanis\kw_templates\ATemplate;
8
use kalanis\kw_templates\Template\TFile;
9
10
11
class CurrentPage extends ATemplate
12
{
13
    use TFile;
14
15 5
    protected function templatePath(): string
16
    {
17 5
        return __DIR__ . '/Templates/CurrentPage.phtml';
18
    }
19
20 5
    protected function fillInputs(): void
21
    {
22 5
        $this->addInput('{PAGE_URL}');
23 5
        $this->addInput('{PAGE_NUMBER}');
24 5
    }
25
26 5
    public function setData(ILink $link, string $pageNumber): self
27
    {
28 5
        $this->updateItem('{PAGE_URL}', $link->getPageLink());
29 5
        $this->updateItem('{PAGE_NUMBER}', $pageNumber);
30 5
        return $this;
31
    }
32
}
33