SimpleReportFactory::generateReport()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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