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

UserPreferenceList   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getIterator() 0 4 1
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