Completed
Push — v2 ( 32d34c...e0e9a9 )
by Jean
14s queued 13s
created

ModelService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 8 1
1
<?php
2
3
namespace Tests;
4
5
use ETNA\Doctrine\Entity\AbstractEntityService;
6
7
class ModelService extends AbstractEntityService
8
{
9
    public function __construct($em, $validator)
10
    {
11
        parent::__construct($em, $validator);
12
    }
13
14
    public function create($datas)
15
    {
16
        $model = new Model();
17
18
        $this->setPropertiesToEntity($datas, ['create'], $model);
19
20
        return $model;
21
    }
22
}
23