Completed
Push — spi_log_cache_hits ( 876d84...ef4861 )
by André
39:52
created

UserPreferenceList::getIterator()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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