AllLinksReports   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAllLinksInner() 0 10 2
1
<?php
2
3
namespace Sunnysideup\TemplateOverview\Api\Providers;
4
5
use SilverStripe\Reports\Report;
6
use Sunnysideup\TemplateOverview\Api\AllLinksProviderBase;
7
8
class AllLinksReports extends AllLinksProviderBase
9
{
10
    public function getAllLinksInner(): array
11
    {
12
        $array = [];
13
        $reports = Report::get_reports();
14
        foreach ($reports as $report) {
15
            $link = $report->getLink();
16
            $array[$link] = $link;
17
        }
18
19
        return $array;
20
    }
21
}
22