Code Duplication    Length = 8-8 lines in 2 locations

src/JMS/LuaConstraintViolationHandler.php 1 location

@@ 27-34 (lines=8) @@
24
            'Symfony\Component\Validator\ConstraintViolationList' => 'serializeList',
25
            'Symfony\Component\Validator\ConstraintViolation'     => 'serializeViolation',
26
        ];
27
        foreach ($types as $type => $method) {
28
            $methods[] = [
29
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
30
                'type'      => $type,
31
                'format'    => 'lua',
32
                'method'    => $method,
33
            ];
34
        }
35
        return $methods;
36
    }
37

src/JMS/LuaDateHandler.php 1 location

@@ 32-39 (lines=8) @@
29
            'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
30
            'format'    => 'lua',
31
        ];
32
        foreach ($types as $type) {
33
            $methods[] = [
34
                'type'      => $type,
35
                'format'    => 'lua',
36
                'direction' => GraphNavigator::DIRECTION_SERIALIZATION,
37
                'method'    => 'serialize' . $type,
38
            ];
39
        }
40
        return $methods;
41
    }
42