|
@@ 162-172 (lines=11) @@
|
| 159 |
|
private function applyConverters(AnnotationCollection $annotations, DefaultServiceMethodBuilder $builder): void |
| 160 |
|
{ |
| 161 |
|
$responseBody = $annotations->get(Annot\ResponseBody::class); |
| 162 |
|
if ($responseBody !== null) { |
| 163 |
|
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */ |
| 164 |
|
$builder->setResponseBodyConverter( |
| 165 |
|
$this->converterProvider->getResponseBodyConverter(new TypeToken($responseBody->getValue())) |
| 166 |
|
); |
| 167 |
|
} else { |
| 168 |
|
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */ |
| 169 |
|
$builder->setResponseBodyConverter( |
| 170 |
|
$this->converterProvider->getResponseBodyConverter(new TypeToken(StreamInterface::class)) |
| 171 |
|
); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
$errorBody = $annotations->get(Annot\ErrorBody::class); |
| 175 |
|
if ($errorBody !== null) { |
|
@@ 175-185 (lines=11) @@
|
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
$errorBody = $annotations->get(Annot\ErrorBody::class); |
| 175 |
|
if ($errorBody !== null) { |
| 176 |
|
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */ |
| 177 |
|
$builder->setErrorBodyConverter( |
| 178 |
|
$this->converterProvider->getResponseBodyConverter(new TypeToken($errorBody->getValue())) |
| 179 |
|
); |
| 180 |
|
} else { |
| 181 |
|
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */ |
| 182 |
|
$builder->setErrorBodyConverter( |
| 183 |
|
$this->converterProvider->getResponseBodyConverter(new TypeToken(StreamInterface::class)) |
| 184 |
|
); |
| 185 |
|
} |
| 186 |
|
} |
| 187 |
|
} |
| 188 |
|
|