Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
zendframework/zendframework#6903 - importing `MergeReplaceKeyInterfac…
Browse files Browse the repository at this point in the history
…e` interface
  • Loading branch information
Ocramius committed Dec 6, 2014
1 parent 61d350d commit 0bbe140
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ArrayUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Traversable;
use Zend\Stdlib\ArrayUtils\MergeRemoveKey;
use Zend\Stdlib\ArrayUtils\MergeReplaceKeyInterface;

/**
* Utility class for testing and manipulation of PHP arrays.
Expand Down Expand Up @@ -258,7 +259,7 @@ public static function iteratorToArray($iterator, $recursive = true)
public static function merge(array $a, array $b, $preserveNumericKeys = false)
{
foreach ($b as $key => $value) {
if ($value instanceof ArrayUtils\MergeReplaceKeyInterface) {
if ($value instanceof MergeReplaceKeyInterface) {
$a[$key] = $value->getData();
} elseif (isset($a[$key]) || array_key_exists($key, $a)) {
if ($value instanceof MergeRemoveKey) {
Expand Down

0 comments on commit 0bbe140

Please sign in to comment.