Mapper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFilledEntity() 0 4 1
A getEntityData() 0 4 1
1
<?php
2
namespace Vsmoraes\DynamoMapper;
3
4
use Vsmoraes\DynamoMapper\Mappings\Factory;
5
6
class Mapper
7
{
8
    /**
9
     * @var Factory
10
     */
11
    private $mappingFactory;
12
13
    public function __construct(Factory $mappingFactory)
14
    {
15
        $this->mappingFactory = $mappingFactory;
16
    }
17
18
    public function getFilledEntity($entity, array $data)
19
    {
20
        return (new EntityMap($entity, $data, $this->mappingFactory))->getMap();
21
    }
22
23
    public function getEntityData($entity)
24
    {
25
        return (new DataMap($entity, $this->mappingFactory))->getMap();
26
    }
27
}
28