Code Duplication    Length = 30-31 lines in 2 locations

src/DataTransformer/Model/GroupDataTransformer.php 1 location

@@ 12-41 (lines=30) @@
9
 * Class GroupDataTransformer
10
 * @package OmnideskBundle\DataTransformer\Model
11
 */
12
class GroupDataTransformer implements DataTransformerInterface
13
{
14
    /**
15
     * @param array $value
16
     * @return Group
17
     */
18
    public function transform($value)
19
    {
20
        $model = new Group();
21
        $model
22
            ->setId($value['group_id'])
23
            ->setTitle($value['group_title'])
24
            ->setFromName($value['group_from_name'])
25
            ->setSignature($value['group_signature'])
26
            ->setActive($value['active'])
27
            ->setCreatedAt(new \DateTime($value['created_at']))
28
            ->setUpdatedAt(new \DateTime($value['updated_at']));
29
30
        return $model;
31
    }
32
33
    /**
34
     * @param mixed $value
35
     * @return mixed
36
     */
37
    public function reverseTransform($value)
38
    {
39
        throw new \LogicException('Method not implemented.');
40
    }
41
}
42

src/DataTransformer/Model/StaffDataTransformer.php 1 location

@@ 11-41 (lines=31) @@
8
 * Class StaffDataTransformer
9
 * @package OmnideskBundle\DataTransformer\Model
10
 */
11
class StaffDataTransformer implements DataTransformerInterface
12
{
13
    /**
14
     * @param array $value
15
     * @return Staff
16
     */
17
    public function transform($value)
18
    {
19
        $model = new Staff();
20
        $model
21
            ->setId($value['staff_id'])
22
            ->setEmail($value['staff_email'])
23
            ->setFullName($value['staff_full_name'])
24
            ->setSignature($value['staff_signature'])
25
            ->setThumbnail($value['thumbnail'])
26
            ->setActive($value['active'])
27
            ->setCreatedAt(new \DateTime($value['created_at']))
28
            ->setUpdatedAt(new \DateTime($value['updated_at']));
29
30
        return $model;
31
    }
32
33
    /**
34
     * @param array $value
35
     * @return Staff
36
     */
37
    public function reverseTransform($value)
38
    {
39
        throw new \LogicException('Method not implemented.');
40
    }
41
}
42