DependencyTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A dependencies() 0 4 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cushon\HealthBundle\Message\Result\Traits;
6
7
use Cushon\HealthBundle\ApplicationHealth\HealthReport\DependencyStatus;
8
use Ds\Set;
9
use Generator;
10
11
trait DependencyTrait
12
{
13
    /**
14
     * @var Set<DependencyStatus>
15
     */
16
    private Set $dependencies;
17
18
    /**
19
     * @psalm-return Generator<int, DependencyStatus, mixed, void>
20
     * @return iterable<DependencyStatus>
21
     */
22
    public function dependencies(): iterable
23
    {
24
        foreach ($this->dependencies as $dependency) {
25
            yield $dependency;
26
        }
27
    }
28
}
29