Code Duplication    Length = 47-47 lines in 2 locations

src/Jms/Handler/JsonSchemaDateHandler.php 1 location

@@ 16-62 (lines=47) @@
13
14
    protected $defaultTimezone;
15
16
    public static function getSubscribingMethods()
17
    {
18
        return array(
19
            array(
20
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
21
                'format' => 'json',
22
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Date',
23
                'method' => 'deserializeDate'
24
            ),
25
            array(
26
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
27
                'format' => 'json',
28
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Date',
29
                'method' => 'serializeDate'
30
            ),
31
            array(
32
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
33
                'format' => 'json',
34
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\DateTime',
35
                'method' => 'deserializeDateTime'
36
            ),
37
            array(
38
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
39
                'format' => 'json',
40
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\DateTime',
41
                'method' => 'serializeDateTime'
42
            ),
43
            array(
44
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
45
                'format' => 'json',
46
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Time',
47
                'method' => 'deserializeTime'
48
            ),
49
            array(
50
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
51
                'format' => 'json',
52
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Time',
53
                'method' => 'serializeTime'
54
            ),
55
            array(
56
                'type' => 'DateInterval',
57
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
58
                'format' => 'json',
59
                'method' => 'deserializeDateIntervalXml',
60
            ),
61
        );
62
    }
63
64
    public function __construct($defaultTimezone = 'UTC')
65
    {

src/Jms/Handler/XmlSchemaDateHandler.php 1 location

@@ 16-62 (lines=47) @@
13
14
    protected $defaultTimezone;
15
16
    public static function getSubscribingMethods()
17
    {
18
        return array(
19
            array(
20
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
21
                'format' => 'xml',
22
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Date',
23
                'method' => 'deserializeDate'
24
            ),
25
            array(
26
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
27
                'format' => 'xml',
28
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Date',
29
                'method' => 'serializeDate'
30
            ),
31
            array(
32
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
33
                'format' => 'xml',
34
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\DateTime',
35
                'method' => 'deserializeDateTime'
36
            ),
37
            array(
38
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
39
                'format' => 'xml',
40
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\DateTime',
41
                'method' => 'serializeDateTime'
42
            ),
43
            array(
44
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
45
                'format' => 'xml',
46
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Time',
47
                'method' => 'deserializeTime'
48
            ),
49
            array(
50
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
51
                'format' => 'xml',
52
                'type' => 'GoetasWebservices\Xsd\XsdToPhp\XMLSchema\Time',
53
                'method' => 'serializeTime'
54
            ),
55
            array(
56
                'type' => 'DateInterval',
57
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
58
                'format' => 'xml',
59
                'method' => 'deserializeDateIntervalXml',
60
            ),
61
        );
62
    }
63
64
    public function __construct($defaultTimezone = 'UTC')
65
    {