Completed
Push — master ( f2c57a...b4ecb3 )
by Gabriel
02:40
created

CategoryMapper::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Waredesk\Mappers\Product;
4
5
use Waredesk\Mapper;
6
use Waredesk\Models\Product\Category;
7
8
class CategoryMapper extends Mapper
9
{
10 3
    public function map(Category $category, $data): Category
11
    {
12 3
        $category->reset($data);
13 3
        return $category;
14
    }
15
}
16