WhoHasAccessToCodeRepo   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCalculatedAnswer() 0 5 1
1
<?php
2
3
namespace Sunnysideup\HealthCheckProvider\Checks\Security;
4
5
use SilverStripe\Control\Director;
6
use Sunnysideup\HealthCheckProvider\Checks\HealthCheckItemRunner;
7
8
class WhoHasAccessToCodeRepo extends HealthCheckItemRunner
9
{
10
    public function getCalculatedAnswer(): string
11
    {
12
        return trim(shell_exec(
13
            '
14
                cd ' . Director::baseFolder() . ' && git config --get remote.origin.url
15
            '
16
        ));
17
    }
18
}
19