Completed
Pull Request — master (#19)
by Yann
02:59
created

EntryIterator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
namespace Genkgo\Camt\Iterator;
3
4
use AppendIterator;
5
use ArrayIterator;
6
use Genkgo\Camt\DTO;
7
8
/**
9
 * Class SimpleEntryIterator
10
 * @package Genkgo\Camt\Iterator
11
 */
12
class EntryIterator extends \IteratorIterator
13
{
14
    /**
15
     * @param Message $message
16
     */
17 1
    public function __construct(DTO\Message $message)
18
    {
19 1
        $appendIterator = new AppendIterator();
20 1
        $records = $message->getRecords();
21 1
        foreach ($records as $record) {
22 1
            $appendIterator->append(new ArrayIterator($record->getEntries()));
23 1
        }
24
25 1
        parent::__construct($appendIterator);
26 1
    }
27
}
28