Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
14 | 2 | public function mapArrayToCollection(array $data) |
|
15 | { |
||
16 | 2 | $collection = new RegionCollection(); |
|
17 | 2 | foreach ($data as $attributes) { |
|
18 | 2 | $region = $this->mapArrayToEntity($attributes); |
|
19 | 2 | if (null !== $region) { |
|
20 | 2 | $collection->add($region); |
|
21 | } |
||
22 | } |
||
23 | |||
24 | 2 | return $collection; |
|
25 | } |
||
26 | |||
57 |