@@ 178-182 (lines=5) @@ | ||
175 | return $this; |
|
176 | } |
|
177 | ||
178 | if ($handler instanceof JsonSerializer && $handler instanceof JsonDeserializer) { |
|
179 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), $handler, $handler); |
|
180 | ||
181 | return $this; |
|
182 | } |
|
183 | ||
184 | if ($handler instanceof JsonSerializer) { |
|
185 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), $handler); |
|
@@ 184-188 (lines=5) @@ | ||
181 | return $this; |
|
182 | } |
|
183 | ||
184 | if ($handler instanceof JsonSerializer) { |
|
185 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), $handler); |
|
186 | ||
187 | return $this; |
|
188 | } |
|
189 | ||
190 | if ($handler instanceof JsonDeserializer) { |
|
191 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), null, $handler); |
|
@@ 190-194 (lines=5) @@ | ||
187 | return $this; |
|
188 | } |
|
189 | ||
190 | if ($handler instanceof JsonDeserializer) { |
|
191 | $this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new TypeToken($type), null, $handler); |
|
192 | ||
193 | return $this; |
|
194 | } |
|
195 | ||
196 | throw new InvalidArgumentException(sprintf('Handler of type "%s" is not supported', get_class($handler))); |
|
197 | } |