Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
IteratorDecorator
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 6
42
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 current
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 key
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 next
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 rewind
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 valid
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace CirrusSearch\Iterator;
4
5use Iterator;
6
7/**
8 * Allows extending classes to decorate an Iterator with
9 * reduced boilerplate.
10 */
11abstract class IteratorDecorator implements Iterator {
12    protected $iterator;
13
14    public function __construct( Iterator $iterator ) {
15        $this->iterator = $iterator;
16    }
17
18    public function current() {
19        return $this->iterator->current();
20    }
21
22    public function key() {
23        return $this->iterator->key();
24    }
25
26    public function next() {
27        $this->iterator->next();
28    }
29
30    public function rewind() {
31        $this->iterator->rewind();
32    }
33
34    public function valid() {
35        return $this->iterator->valid();
36    }
37}