Recipients   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getIterator() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Notifier\Recipient;
6
7
use ArrayIterator;
8
use IteratorAggregate;
9
use Traversable;
10
11
class Recipients implements IteratorAggregate
12
{
13
    /** @var Recipient[] */
14
    private $recipients;
15
16 3
    final public function __construct(Recipient ...$recipients)
17
    {
18 3
        $this->recipients = $recipients;
19 3
    }
20
21
    /**
22
     * @return Traversable|Recipient[]
23
     */
24 2
    public function getIterator()
25
    {
26 2
        return new ArrayIterator($this->recipients);
27
    }
28
}
29