| @@ 310-317 (lines=8) @@ | ||
| 307 | * @return bool |
|
| 308 | * @throws LogicException |
|
| 309 | */ |
|
| 310 | public function isBodyObject() |
|
| 311 | { |
|
| 312 | if (!$this->annotations->exists(Body::NAME)) { |
|
| 313 | return false; |
|
| 314 | } |
|
| 315 | ||
| 316 | return $this->methodModel->getParameter($this->getBodyAnnotation()->getVariableName())->isObject(); |
|
| 317 | } |
|
| 318 | ||
| 319 | /** |
|
| 320 | * If the body parameter is an array |
|
| @@ 325-332 (lines=8) @@ | ||
| 322 | * @return bool |
|
| 323 | * @throws LogicException |
|
| 324 | */ |
|
| 325 | public function isBodyArray() |
|
| 326 | { |
|
| 327 | if (!$this->annotations->exists(Body::NAME)) { |
|
| 328 | return false; |
|
| 329 | } |
|
| 330 | ||
| 331 | return $this->methodModel->getParameter($this->getBodyAnnotation()->getVariableName())->isArray(); |
|
| 332 | } |
|
| 333 | ||
| 334 | /** |
|
| 335 | * If the body parameter is optional |
|
| @@ 340-347 (lines=8) @@ | ||
| 337 | * @return bool |
|
| 338 | * @throws LogicException |
|
| 339 | */ |
|
| 340 | public function isBodyOptional() |
|
| 341 | { |
|
| 342 | if (!$this->annotations->exists(Body::NAME)) { |
|
| 343 | return false; |
|
| 344 | } |
|
| 345 | ||
| 346 | return $this->methodModel->getParameter($this->getBodyAnnotation()->getVariableName())->isOptional(); |
|
| 347 | } |
|
| 348 | ||
| 349 | /** |
|
| 350 | * If the body parameter implements \JsonSerializable |
|