AppendIterator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 0
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace Indigo\Iterator;
4
5
/**
6
 * This is an extension of the SPL AppendIterator.
7
 *
8
 * Accepts a Traversable containing Iterators.
9
 *
10
 * @author Márk Sági-Kazár <[email protected]>
11
 */
12
class AppendIterator extends \AppendIterator
13
{
14
    /**
15
     * @param \Traversable $iterators
16
     */
17 3
    public function __construct(\Traversable $iterators)
18
    {
19 3
        parent::__construct();
20
21 3
        foreach ($iterators as $iterator) {
22 2
            $this->append($iterator);
23 3
        }
24 3
    }
25
}
26