Completed
Push — feature/other-validation ( 1442c4...18a759 )
by Narcotic
64:54
created

SchemaEnumHandler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A serializeSchemaEnumToJson() 0 8 1
1
<?php
2
/**
3
 * SchemaEnumHandler class file
4
 */
5
6
namespace Graviton\SchemaBundle\Serializer\Handler;
7
8
use Graviton\SchemaBundle\Document\SchemaEnum;
9
use JMS\Serializer\Context;
10
use JMS\Serializer\JsonSerializationVisitor;
11
12
/**
13
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
14
 * @license  http://opensource.org/licenses/GPL GPL
15
 * @link     http://swisscom.ch
16
 */
17
class SchemaEnumHandler
18
{
19
20
    /**
21
     * Serialize SchemaEnum to JSON
22
     *
23
     * @param JsonSerializationVisitor $visitor    Visitor
24
     * @param SchemaEnum               $schemaEnum enum
25
     * @param array                    $type       Type
26
     * @param Context                  $context    Context
27
     *
28
     * @return array
29
     */
30
    public function serializeSchemaEnumToJson(
31
        JsonSerializationVisitor $visitor,
0 ignored issues
show
Unused Code introduced by
The parameter $visitor is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
        SchemaEnum $schemaEnum,
33
        array $type,
0 ignored issues
show
Unused Code introduced by
The parameter $type is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
34
        Context $context
0 ignored issues
show
Unused Code introduced by
The parameter $context is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
35
    ) {
36
        return $schemaEnum->getValues();
37
    }
38
}
39