UrlSet::getIterator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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