DependencyTrait::dependencies()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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