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