Code Duplication    Length = 10-10 lines in 4 locations

src/Arrayy.php 4 locations

@@ 2976-2985 (lines=10) @@
2973
     * @return static
2974
     *                <p>(Immutable)</p>
2975
     */
2976
    public function mergeAppendKeepIndex(array $array = [], bool $recursive = false): self
2977
    {
2978
        if ($recursive === true) {
2979
            $result = \array_replace_recursive($this->getArray(), $array);
2980
        } else {
2981
            $result = \array_replace($this->getArray(), $array);
2982
        }
2983
2984
        return static::create(
2985
            $result,
2986
            $this->iteratorClass,
2987
            false
2988
        );
@@ 3003-3012 (lines=10) @@
3000
     * @return static
3001
     *                <p>(Immutable)</p>
3002
     */
3003
    public function mergeAppendNewIndex(array $array = [], bool $recursive = false): self
3004
    {
3005
        if ($recursive === true) {
3006
            $result = \array_merge_recursive($this->getArray(), $array);
3007
        } else {
3008
            $result = \array_merge($this->getArray(), $array);
3009
        }
3010
3011
        return static::create(
3012
            $result,
3013
            $this->iteratorClass,
3014
            false
3015
        );
@@ 3029-3038 (lines=10) @@
3026
     * @return static
3027
     *                <p>(Immutable)</p>
3028
     */
3029
    public function mergePrependKeepIndex(array $array = [], bool $recursive = false): self
3030
    {
3031
        if ($recursive === true) {
3032
            $result = \array_replace_recursive($array, $this->getArray());
3033
        } else {
3034
            $result = \array_replace($array, $this->getArray());
3035
        }
3036
3037
        return static::create(
3038
            $result,
3039
            $this->iteratorClass,
3040
            false
3041
        );
@@ 3056-3065 (lines=10) @@
3053
     * @return static
3054
     *                <p>(Immutable)</p>
3055
     */
3056
    public function mergePrependNewIndex(array $array = [], bool $recursive = false): self
3057
    {
3058
        if ($recursive === true) {
3059
            $result = \array_merge_recursive($array, $this->getArray());
3060
        } else {
3061
            $result = \array_merge($array, $this->getArray());
3062
        }
3063
3064
        return static::create(
3065
            $result,
3066
            $this->iteratorClass,
3067
            false
3068
        );