HealthContributorRegistryBuilder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 13
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 10 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Nwidart\Actuator\Health;
6
7
class HealthContributorRegistryBuilder
8
{
9 7
    public function build(): HealthContributorRegistry
10
    {
11 7
        $registry = new HealthContributorRegistry();
12 7
        $contributors = config('actuator.health.contributors');
13 7
        foreach ($contributors as $name => $contributor) {
14 5
            $registry->register($name, app($contributor));
15
        }
16
17 7
        return $registry;
18
    }
19
}
20