Pager   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

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