public static function mergeExtraArray($mergeDeep, $array1, $array2)
    {
        if ($mergeDeep) {
            return NestedArray::mergeDeep($array1, $array2);
        }

        return array_merge($array1, $array2);
    }
public static function mergeExtraArray($mergeDeep, $array1, $array2)
    {
        if ($mergeDeep) {
            return NestedArray::mergeDeep($array1, $array2);
        }

        return array_merge($array1, $array2);
    }
public static function mergeExtraArray ( $ mergeDeep , $ array1 , $ array2 ) { if ( $ mergeDeep ) { return NestedArray :: mergeDeep ( $ array1 , $ array2 ) ; } return array_merge ( $ array1 , $ array2 ) ; }
Merges two arrays either via arrayMergeDeep or via array_merge.

@param bool $mergeDeep
@param array $array1
@param array $array2
@return array
Merges two arrays either via arrayMergeDeep or via array_merge .