Completed
Push — master ( 336c64...8fa798 )
by Łukasz
25:31
created

BookmarkList::getIterator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
cc 1
eloc 2
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\Bookmark;
10
11
use ArrayIterator;
12
use IteratorAggregate;
13
use eZ\Publish\API\Repository\Values\ValueObject;
14
15
/**
16
 * List of bookmarked locations.
17
 */
18
class BookmarkList extends ValueObject implements IteratorAggregate
19
{
20
    /**
21
     * The total number of bookmarks.
22
     *
23
     * @var int
24
     */
25
    public $totalCount = 0;
26
27
    /**
28
     * List of bookmarked locations.
29
     *
30
     * @var \eZ\Publish\API\Repository\Values\Content\Location[]
31
     */
32
    public $items = [];
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getIterator()
38
    {
39
        return new ArrayIterator($this->items);
40
    }
41
}
42