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