1 | <?php |
||
38 | final class JsonDocumentType extends InternalParentClass |
||
39 | { |
||
40 | /** |
||
41 | * @var SerializerInterface |
||
42 | */ |
||
43 | private $serializer; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | private $format = 'json'; |
||
49 | |||
50 | /** |
||
51 | * @var array |
||
52 | */ |
||
53 | private $serializationContext = []; |
||
54 | |||
55 | /** |
||
56 | * @var array |
||
57 | */ |
||
58 | private $deserializationContext = []; |
||
59 | |||
60 | /** |
||
61 | * Sets the serializer to use. |
||
62 | * |
||
63 | * @param SerializerInterface $serializer |
||
64 | */ |
||
65 | public function setSerializer(SerializerInterface $serializer) |
||
69 | |||
70 | /** |
||
71 | * Gets the serializer or throw an exception if it isn't available. |
||
72 | * |
||
73 | * @throws \RuntimeException |
||
74 | * |
||
75 | * @return SerializerInterface |
||
76 | */ |
||
77 | private function getSerializer() |
||
85 | |||
86 | /** |
||
87 | * Sets the serialization format (default to "json"). |
||
88 | * |
||
89 | * @param string $format |
||
90 | */ |
||
91 | public function setFormat($format) |
||
95 | |||
96 | /** |
||
97 | * Sets the serialization context (default to an empty array). |
||
98 | * |
||
99 | * @param array $serializationContext |
||
100 | */ |
||
101 | public function setSerializationContext(array $serializationContext) |
||
105 | |||
106 | /** |
||
107 | * Sets the deserialization context (default to an empty array). |
||
108 | * |
||
109 | * @param array $deserializationContext |
||
110 | */ |
||
111 | public function setDeserializationContext(array $deserializationContext) |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public function convertToPHPValue($value, AbstractPlatform $platform) |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | public function requiresSQLCommentHint(AbstractPlatform $platform) |
||
155 | |||
156 | /** |
||
157 | * {@inheritdoc} |
||
158 | */ |
||
159 | public function getName() |
||
163 | } |
||
164 |
This check looks for classes that have been defined more than once in the same file.
If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.