Completed
Push — 7.5 ( 17c267...9e0292 )
by Łukasz
47:52 queued 28:25
created

RelationList::getIterator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
cc 1
nc 1
nop 0
rs 10
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\API\Repository\Values\Content;
10
11
use ArrayIterator;
12
use Iterator;
13
use IteratorAggregate;
14
use eZ\Publish\API\Repository\Values\ValueObject;
15
16
/**
17
 * List of relations.
18
 */
19
class RelationList extends ValueObject implements IteratorAggregate
20
{
21
    /**
22
     * @var int
23
     */
24
    public $totalCount = 0;
25
26
    /**
27
     * @var \eZ\Publish\API\Repository\Values\Content\RelationList\RelationListItemInterface[]
28
     */
29
    public $items = [];
30
31
    public function getIterator(): Iterator
32
    {
33
        return new ArrayIterator($this->items);
34
    }
35
}
36