@@ 97-99 (lines=3) @@ | ||
94 | protected static function validateMandatoryOptions(array $options, $index) |
|
95 | { |
|
96 | foreach (static::$mandatoryOptions as $optionIndex => $type) { |
|
97 | if (!array_key_exists($optionIndex, $options)) { |
|
98 | throw new \InvalidArgumentException('extra.' . static::CONFIG_MAIN_KEY . "[$index].{$optionIndex} is required!"); |
|
99 | } |
|
100 | ||
101 | $callable = "is_{$type}"; |
|
102 | if (!$callable($options[$optionIndex])) { |
|
@@ 102-104 (lines=3) @@ | ||
99 | } |
|
100 | ||
101 | $callable = "is_{$type}"; |
|
102 | if (!$callable($options[$optionIndex])) { |
|
103 | throw new \InvalidArgumentException('extra.' . static::CONFIG_MAIN_KEY . "[$index].{$optionIndex} should be {$type}!"); |
|
104 | } |
|
105 | } |
|
106 | } |
|
107 | } |