|
@@ 168-172 (lines=5) @@
|
| 165 |
|
return $this; |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
if ($handler instanceof JsonSerializer && $handler instanceof JsonDeserializer) { |
| 169 |
|
$this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new DefaultPhpType($type), $handler, $handler); |
| 170 |
|
|
| 171 |
|
return $this; |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
if ($handler instanceof JsonSerializer) { |
| 175 |
|
$this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new DefaultPhpType($type), $handler); |
|
@@ 174-178 (lines=5) @@
|
| 171 |
|
return $this; |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
if ($handler instanceof JsonSerializer) { |
| 175 |
|
$this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new DefaultPhpType($type), $handler); |
| 176 |
|
|
| 177 |
|
return $this; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
if ($handler instanceof JsonDeserializer) { |
| 181 |
|
$this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new DefaultPhpType($type), null, $handler); |
|
@@ 180-184 (lines=5) @@
|
| 177 |
|
return $this; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
if ($handler instanceof JsonDeserializer) { |
| 181 |
|
$this->typeAdapterFactories[] = new CustomWrappedTypeAdapterFactory(new DefaultPhpType($type), null, $handler); |
| 182 |
|
|
| 183 |
|
return $this; |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
throw new BadMethodCallException(sprintf('Handler of type "%s" is not supported', get_class($handler))); |
| 187 |
|
} |