Completed
Push — 7.5 ( 13f815...467086 )
by André
19:24
created

ContentDraftList   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
rs 10
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\Content;
10
11
use ArrayIterator;
12
use Iterator;
13
use IteratorAggregate;
14
use eZ\Publish\API\Repository\Values\ValueObject;
15
16
/**
17
 * List of content drafts.
18
 */
19
class ContentDraftList extends ValueObject implements IteratorAggregate
20
{
21
    /**
22
     * @var int
23
     */
24
    public $totalCount = 0;
25
26
    /**
27
     * @var \eZ\Publish\API\Repository\Values\Content\DraftList\ContentDraftListItemInterface[]
28
     */
29
    public $items = [];
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getIterator(): Iterator
35
    {
36
        return new ArrayIterator($this->items);
37
    }
38
}
39