Entity   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPresentation() 0 12 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\Module\statistics\Statistics\FieldPresentation;
6
7
use SimpleSAML\Metadata\MetaDataStorageHandler;
8
9
class Entity extends Base
10
{
11
    /**
12
     * @return array
13
     */
14
    public function getPresentation(): array
15
    {
16
        $mh = MetaDataStorageHandler::getMetadataHandler();
17
        $metadata = $mh->getList($this->config);
18
19
        $translation = ['_' => 'All services'];
20
        foreach ($this->fields as $field) {
21
            if (array_key_exists($field, $metadata)) {
22
                $translation[$field] = $this->template->getEntityDisplayName($metadata[$field]);
23
            }
24
        }
25
        return $translation;
26
    }
27
}
28