@@ 186-190 (lines=5) @@ | ||
183 | return $this; |
|
184 | } |
|
185 | ||
186 | if ($handler instanceof JsonSerializer && $handler instanceof JsonDeserializer) { |
|
187 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), $handler, $handler); |
|
188 | ||
189 | return $this; |
|
190 | } |
|
191 | ||
192 | if ($handler instanceof JsonSerializer) { |
|
193 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), $handler); |
|
@@ 192-196 (lines=5) @@ | ||
189 | return $this; |
|
190 | } |
|
191 | ||
192 | if ($handler instanceof JsonSerializer) { |
|
193 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), $handler); |
|
194 | ||
195 | return $this; |
|
196 | } |
|
197 | ||
198 | if ($handler instanceof JsonDeserializer) { |
|
199 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), null, $handler); |
|
@@ 198-202 (lines=5) @@ | ||
195 | return $this; |
|
196 | } |
|
197 | ||
198 | if ($handler instanceof JsonDeserializer) { |
|
199 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), null, $handler); |
|
200 | ||
201 | return $this; |
|
202 | } |
|
203 | ||
204 | throw new InvalidArgumentException(\sprintf('Handler of type "%s" is not supported', \get_class($handler))); |
|
205 | } |