SimpleReportFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A generateReport() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cushon\HealthBundle\ApplicationHealth\Dependencies\HealthReportFactory;
6
7
use Cushon\HealthBundle\ApplicationHealth\Dependencies\Simpledependencies\HealthReportFactory;
8
use Cushon\HealthBundle\ApplicationHealth\HealthReport\DependencyStatus;
9
use Cushon\HealthBundle\ApplicationHealth\HealthReport\SimpleHealthReport;
10
11
final class SimpleReportFactory implements HealthReportFactory
12
{
13
    /**
14
     * @param bool $health
15
     * @param DependencyStatus ...$dependencyStatuses
16
     * @return SimpleHealthReport
17
     */
18
    public function generateReport(bool $health, DependencyStatus ...$dependencyStatuses): SimpleHealthReport
19
    {
20
        return new SimpleHealthReport(
21
            $health,
22
            ...$dependencyStatuses
23
        );
24
    }
25
}
26