private function mergeArrays($deep, $array1, $array2)
    {
        if ($deep === 'merge') {
            return Utils::arrayMergeRecursiveUnique($array1, $array2);
        }
        if ($deep === true) {
            return array_replace_recursive($array1, $array2);
        }

        return array_merge($array1, $array2);
    }
private function mergeArrays($deep, $array1, $array2)
    {
        if ($deep === 'merge') {
            return Utils::arrayMergeRecursiveUnique($array1, $array2);
        }
        if ($deep === true) {
            return array_replace_recursive($array1, $array2);
        }

        return array_merge($array1, $array2);
    }
private function mergeArrays ( $ deep , $ array1 , $ array2 ) { if ( $ deep === 'merge' ) { return Utils :: arrayMergeRecursiveUnique ( $ array1 , $ array2 ) ; } if ( $ deep === true ) { return array_replace_recursive ( $ array1 , $ array2 ) ; } return array_merge ( $ array1 , $ array2 ) ; }
Merge arrays based on deepness

@param string|bool $deep
@param array $array1
@param array $array2
@return array
Merge arrays based on deepness