Completed
Push — master ( c3c281...ab94e9 )
by Gabriel
03:37
created

PricesMapper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 10
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A map() 0 7 2
1
<?php
2
3
namespace Waredesk\Mappers\Product\Variant;
4
5
use Waredesk\Collections\Products\Variants\Prices;
6
use Waredesk\Models\Product\Variant\Price;
7
8
class PricesMapper
9
{
10
    public function map(Prices $prices, array $data): Prices
11
    {
12
        foreach ($data as $priceData) {
13
            $prices->add((new PriceMapper())->map(new Price(), $priceData));
14
        }
15
        return $prices;
16
    }
17
}
18