IteratorProxyMessageIterator   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A current() 0 4 1
A next() 0 4 1
A key() 0 4 1
A valid() 0 4 1
A rewind() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\NotificationBundle\Iterator;
15
16
/**
17
 * @author Toni Uebernickel <[email protected]>
18
 */
19
class IteratorProxyMessageIterator implements MessageIteratorInterface
20
{
21
    /**
22
     * @var \Iterator
23
     */
24
    protected $iterator;
25
26
    public function __construct(\Iterator $iterator)
27
    {
28
        $this->iterator = $iterator;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function current()
35
    {
36
        return $this->iterator->current();
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function next(): void
43
    {
44
        $this->iterator->next();
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function key()
51
    {
52
        return $this->iterator->key();
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function valid()
59
    {
60
        return $this->iterator->valid();
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function rewind(): void
67
    {
68
        $this->iterator->rewind();
69
    }
70
}
71