ReferencingIterator   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getInnerIterator() 0 4 1
A setInnerIterator() 0 5 1
A rewind() 0 4 1
A current() 0 4 1
A key() 0 4 1
A next() 0 4 1
A valid() 0 4 1
1
<?php
2
3
namespace itertools;
4
5
use OuterIterator;
6
7
8
class ReferencingIterator implements OuterIterator
9
{
10
	protected $innerIterator;
11
12
	public function __construct($innerIterator)
13
	{
14
		$this->innerIterator = IterUtil::asIterator($innerIterator);
15
	}
16
17
 	public function getInnerIterator()
18
 	{
19
 		return $this->innerIterator;
20
 	}
21
 
22
 	public function setInnerIterator($innerIterator)
23
 	{
24
 		$this->innerIterator = $innerIterator;
25
		return $this;
26
 	}
27
28
    public function rewind()
29
	{
30
		return $this->innerIterator->rewind();
31
    }
32
33
    public function current()
34
	{
35
		return $this->innerIterator->current();
36
    }
37
38
    public function key()
39
	{
40
		return $this->innerIterator->key();
41
    }
42
43
    public function next()
44
	{
45
		return $this->innerIterator->next();
46
    }
47
48
    public function valid()
49
	{
50
		return $this->innerIterator->valid();
51
    }
52
}
53
 
54