Completed
Push — master ( 8db338...3a13f3 )
by Vragov
06:07
created

AddGroupRequestDataTransformer::transform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
namespace OmnideskBundle\DataTransformer\Request\Group;
3
4
use OmnideskBundle\DataTransformer\DataTransformerInterface;
5
use OmnideskBundle\Request\Group\AddGroupRequest;
6
7
/**
8
 * Class AddGroupRequestDataTransformer
9
 * @package OmnideskBundle\DataTransformer\Request\Group
10
 */
11 View Code Duplication
class AddGroupRequestDataTransformer implements DataTransformerInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @param AddGroupRequest $value
15
     * @return array
16
     */
17
    public function transform($value)
18
    {
19
        return [
20
            'group_title' => $value->getTitle(),
21
            'group_from_name' => $value->getFromName(),
22
            'group_signature' => $value->getSignature(),
23
        ];
24
    }
25
26
    /**
27
     * @param array $value
28
     * @return AddGroupRequest
29
     */
30
    public function reverseTransform($value)
31
    {
32
        throw new \LogicException('Method not implemented.');
33
    }
34
}
35