Base   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPresentation() 0 3 1
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\Module\statistics\Statistics\FieldPresentation;
6
7
use SimpleSAML\Locale\Translate;
8
use SimpleSAML\XHTML\Template;
9
10
class Base
11
{
12
    /** @var array */
13
    protected array $fields;
14
15
    /** @var \SimpleSAML\XHTML\Template */
16
    protected Template $template;
17
18
    /** @var \SimpleSAML\Locale\Translate */
19
    protected Translate $translator;
20
21
    /** @var string */
22
    protected string $config;
23
24
25
    /**
26
     * @param array $fields
27
     * @param string $config
28
     * @param \SimpleSAML\XHTML\Template $template
29
     */
30
    public function __construct(array $fields, string $config, Template $template)
31
    {
32
        $this->config = $config;
33
        $this->fields = $fields;
34
        $this->template = $template;
35
        $this->translator = $template->getTranslator();
36
    }
37
38
39
    /**
40
     * @return array
41
     */
42
    public function getPresentation(): array
43
    {
44
        return ['_' => 'Total'];
45
    }
46
}
47