Passed
Push — master ( a95233...99c22e )
by Tim
07:58
created

Base::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 6
rs 10
1
<?php
2
3
namespace SimpleSAML\Module\statistics\Statistics\FieldPresentation;
4
5
use SimpleSAML\XHTML\Template;
6
7
class Base
8
{
9
    /** @var array */
10
    protected $fields;
11
12
    /** @var \SimpleSAML\XHTML\Template */
13
    protected $template;
14
15
    /** @var \SimpleSAML\Locale\Translate */
16
    protected $translator;
17
18
    /** @var string */
19
    protected $config;
20
21
22
    /**
23
     * @param array $fields
24
     * @param string $config
25
     * @param \SimpleSAML\XHTML\Template $template
26
     */
27
    public function __construct(array $fields, string $config, Template $template)
28
    {
29
        $this->config = $config;
30
        $this->fields = $fields;
31
        $this->template = $template;
32
        $this->translator = $template->getTranslator();
33
    }
34
35
36
    /**
37
     * @return array
38
     */
39
    public function getPresentation(): array
40
    {
41
        return ['_' => 'Total'];
42
    }
43
}
44