@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $worker = new $cfg[ RB::KEY_HANDLER ](); |
| 148 | 148 | $result = $worker->convert($data, $cfg); |
| 149 | 149 | $result = is_null($cfg[ RB::KEY_KEY ]) ? $result : [$cfg[ RB::KEY_KEY ] => $result]; |
| 150 | - } |
|
| 150 | + } |
|
| 151 | 151 | |
| 152 | 152 | if ($result === null && \is_array($data)) { |
| 153 | 153 | $cfg = $this->getPrimitiveMappingConfigOrThrow($data); |
@@ -225,10 +225,10 @@ discard block |
||
| 225 | 225 | "Missing '{$key_name}' entry in '{$class_name}' class mapping config."); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - if (!\in_array(\gettype($class_config[$key_name]), $allowed_types)) { |
|
| 229 | - throw new Ex\InvalidConfigurationElementException( |
|
| 230 | - sprintf("Config '%s' for '{$class_name}' must be these types: %s.", RB::KEY_KEY, \implode(', ', $allowed_types))); |
|
| 231 | - } |
|
| 228 | + if (!\in_array(\gettype($class_config[$key_name]), $allowed_types)) { |
|
| 229 | + throw new Ex\InvalidConfigurationElementException( |
|
| 230 | + sprintf("Config '%s' for '{$class_name}' must be these types: %s.", RB::KEY_KEY, \implode(', ', $allowed_types))); |
|
| 231 | + } |
|
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | } |