AllLinksReports::getAllLinksInner()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 10
rs 10
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