UrlSet   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 14
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 3 1
1
<?php
2
3
namespace PODEntender\SitemapGenerator;
4
5
class UrlSet implements \IteratorAggregate
6
{
7
    /** @var Url[] */
8
    private $urls = [];
9
10 8
    public function __construct(array $urls)
11
    {
12
        // @todo -> assert elements are of type \PODEntender\SitemapGenerator\Domain\Model\Sitemap\Url
13 8
        $this->urls = $urls;
14 8
    }
15
16 8
    public function getIterator(): \Iterator
17
    {
18 8
        return new \ArrayIterator($this->urls);
19
    }
20
}
21