| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | * @param callable|null $fnDispatcher Function dispatching function that accepts |
| 14 | 14 | * a function name argument and an array of |
| 15 | 15 | * function arguments and returns the result. |
| 16 | 16 | */ |
| 17 | - public function __construct(callable $fnDispatcher = null) | |
| 17 | + public function __construct(?callable $fnDispatcher = null) | |
| 18 | 18 | { |
| 19 | 19 | $this->fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance(); |
| 20 | 20 | } |
| 21 | 21 | /** |
| @@ -89,9 +89,9 @@ | ||
| 89 | 89 | } |
| 90 | 90 | $merged = []; |
| 91 | 91 | foreach ($value as $values) { |
| 92 | 92 | // Only merge up arrays lists and not hashes |
| 93 | - if (\is_array($values) && isset($values[0])) { | |
| 93 | + if (\is_array($values) && \array_key_exists(0, $values)) { | |
| 94 | 94 | $merged = \array_merge($merged, $values); |
| 95 | 95 | } elseif ($values !== $skipElement) { |
| 96 | 96 | $merged[] = $values; |
| 97 | 97 | } |