@@ 621-629 (lines=9) @@ | ||
618 | return $customError; |
|
619 | } |
|
620 | ||
621 | private static function getAllowUnknowns(array $options) : bool |
|
622 | { |
|
623 | $allowUnknowns = $options[FiltererOptions::ALLOW_UNKNOWNS]; |
|
624 | if ($allowUnknowns !== false && $allowUnknowns !== true) { |
|
625 | throw new InvalidArgumentException(sprintf("'%s' option was not a bool", FiltererOptions::ALLOW_UNKNOWNS)); |
|
626 | } |
|
627 | ||
628 | return $allowUnknowns; |
|
629 | } |
|
630 | ||
631 | private static function getDefaultRequired(array $options) : bool |
|
632 | { |
|
@@ 631-641 (lines=11) @@ | ||
628 | return $allowUnknowns; |
|
629 | } |
|
630 | ||
631 | private static function getDefaultRequired(array $options) : bool |
|
632 | { |
|
633 | $defaultRequired = $options[FiltererOptions::DEFAULT_REQUIRED]; |
|
634 | if ($defaultRequired !== false && $defaultRequired !== true) { |
|
635 | throw new InvalidArgumentException( |
|
636 | sprintf("'%s' option was not a bool", FiltererOptions::DEFAULT_REQUIRED) |
|
637 | ); |
|
638 | } |
|
639 | ||
640 | return $defaultRequired; |
|
641 | } |
|
642 | ||
643 | /** |
|
644 | * @param string $responseType The type of object that should be returned. |