|
@@ 601-609 (lines=9) @@
|
| 598 |
|
return $customError; |
| 599 |
|
} |
| 600 |
|
|
| 601 |
|
private static function getAllowUnknowns(array $options) : bool |
| 602 |
|
{ |
| 603 |
|
$allowUnknowns = $options[FiltererOptions::ALLOW_UNKNOWNS]; |
| 604 |
|
if ($allowUnknowns !== false && $allowUnknowns !== true) { |
| 605 |
|
throw new InvalidArgumentException(sprintf("'%s' option was not a bool", FiltererOptions::ALLOW_UNKNOWNS)); |
| 606 |
|
} |
| 607 |
|
|
| 608 |
|
return $allowUnknowns; |
| 609 |
|
} |
| 610 |
|
|
| 611 |
|
private static function getDefaultRequired(array $options) : bool |
| 612 |
|
{ |
|
@@ 611-621 (lines=11) @@
|
| 608 |
|
return $allowUnknowns; |
| 609 |
|
} |
| 610 |
|
|
| 611 |
|
private static function getDefaultRequired(array $options) : bool |
| 612 |
|
{ |
| 613 |
|
$defaultRequired = $options[FiltererOptions::DEFAULT_REQUIRED]; |
| 614 |
|
if ($defaultRequired !== false && $defaultRequired !== true) { |
| 615 |
|
throw new InvalidArgumentException( |
| 616 |
|
sprintf("'%s' option was not a bool", FiltererOptions::DEFAULT_REQUIRED) |
| 617 |
|
); |
| 618 |
|
} |
| 619 |
|
|
| 620 |
|
return $defaultRequired; |
| 621 |
|
} |
| 622 |
|
|
| 623 |
|
/** |
| 624 |
|
* @param string $responseType The type of object that should be returned. |