Completed
Push — master ( 97e40f...89ec5c )
by André
40:26 queued 12:35
created

SearchResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getIterator() 0 4 1
1
<?php
2
3
namespace eZ\Publish\API\Repository\Values\Content\Trash;
4
5
use ArrayIterator;
6
use eZ\Publish\API\Repository\Values\ValueObject;
7
8
class SearchResult extends ValueObject implements \IteratorAggregate
9
{
10
    public function __construct(array $properties = [])
11
    {
12
        if (isset($properties['totalCount'])) {
13
            $this->count = $properties['totalCount'];
0 ignored issues
show
Deprecated Code introduced by
The property eZ\Publish\API\Repositor...sh\SearchResult::$count has been deprecated with message: Property is here purely for BC with 5.x/6.x.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
14
        }
15
16
        parent::__construct($properties);
17
    }
18
19
    /**
20
     * The total number of Trash items.
21
     *
22
     * @var int
23
     */
24
    public $totalCount = 0;
25
26
    /**
27
     * The total number of Trash items.
28
     *
29
     * @deprecated Property is here purely for BC with 5.x/6.x.
30
     * @var int
31
     */
32
    public $count = 0;
33
34
    /**
35
     * The Trash items found for the query.
36
     *
37
     * @var \eZ\Publish\API\Repository\Values\Content\TrashItem[]
38
     */
39
    public $items = [];
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function getIterator()
45
    {
46
        return new ArrayIterator($this->items);
47
    }
48
}
49