FlatDumper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 10 2
1
<?php
2
3
namespace Dwo\Aggregator\Dumper;
4
5
/**
6
 * Class FlatDumper
7
 *
8
 * @author Dave Www <[email protected]>
9
 */
10
class FlatDumper
11
{
12
    /**
13
     * @param \Iterator $group
14
     *
15
     * @return array
16
     */
17
    public static function toArray(\Iterator $group)
18
    {
19
        $dump = [];
20
21
        foreach ($group as $id => $aggregate) {
22
            $dump[$id] = $aggregate->getData();
23
        }
24
25
        return $dump;
26
    }
27
}