Completed
Pull Request — 3.x (#200)
by
unknown
06:29 queued 03:16
created

IteratorProxyMessageIterator   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

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