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