| @@ 2525-2534 (lines=10) @@ | ||
| 2522 | * @return static |
|
| 2523 | * <p>(Immutable)</p> |
|
| 2524 | */ |
|
| 2525 | public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2526 | { |
|
| 2527 | if ($recursive === true) { |
|
| 2528 | $result = \array_replace_recursive($this->getArray(), $array); |
|
| 2529 | } else { |
|
| 2530 | $result = \array_replace($this->getArray(), $array); |
|
| 2531 | } |
|
| 2532 | ||
| 2533 | return static::create( |
|
| 2534 | $result, |
|
| 2535 | $this->iteratorClass, |
|
| 2536 | false |
|
| 2537 | ); |
|
| @@ 2552-2561 (lines=10) @@ | ||
| 2549 | * @return static |
|
| 2550 | * <p>(Immutable)</p> |
|
| 2551 | */ |
|
| 2552 | public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self |
|
| 2553 | { |
|
| 2554 | if ($recursive === true) { |
|
| 2555 | $result = \array_merge_recursive($this->getArray(), $array); |
|
| 2556 | } else { |
|
| 2557 | $result = \array_merge($this->getArray(), $array); |
|
| 2558 | } |
|
| 2559 | ||
| 2560 | return static::create( |
|
| 2561 | $result, |
|
| 2562 | $this->iteratorClass, |
|
| 2563 | false |
|
| 2564 | ); |
|
| @@ 2578-2587 (lines=10) @@ | ||
| 2575 | * @return static |
|
| 2576 | * <p>(Immutable)</p> |
|
| 2577 | */ |
|
| 2578 | public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self |
|
| 2579 | { |
|
| 2580 | if ($recursive === true) { |
|
| 2581 | $result = \array_replace_recursive($array, $this->getArray()); |
|
| 2582 | } else { |
|
| 2583 | $result = \array_replace($array, $this->getArray()); |
|
| 2584 | } |
|
| 2585 | ||
| 2586 | return static::create( |
|
| 2587 | $result, |
|
| 2588 | $this->iteratorClass, |
|
| 2589 | false |
|
| 2590 | ); |
|
| @@ 2605-2614 (lines=10) @@ | ||
| 2602 | * @return static |
|
| 2603 | * <p>(Immutable)</p> |
|
| 2604 | */ |
|
| 2605 | public function mergePrependNewIndex(array $array = [], bool $recursive = false): self |
|
| 2606 | { |
|
| 2607 | if ($recursive === true) { |
|
| 2608 | $result = \array_merge_recursive($array, $this->getArray()); |
|
| 2609 | } else { |
|
| 2610 | $result = \array_merge($array, $this->getArray()); |
|
| 2611 | } |
|
| 2612 | ||
| 2613 | return static::create( |
|
| 2614 | $result, |
|
| 2615 | $this->iteratorClass, |
|
| 2616 | false |
|
| 2617 | ); |
|