function intersect($arr) {
        if($arr instanceof self) {
            $arr = $arr->all();
        }
        
        return (new self(\array_intersect($this->data, $arr)));
    }
function intersect($arr) {
        if($arr instanceof self) {
            $arr = $arr->all();
        }
        
        return (new self(\array_intersect($this->data, $arr)));
    }
function intersect ( $ arr ) { if ( $ arr instanceof self ) { $ arr = $ arr -> all ( ) ; } return ( new self ( \ array_intersect ( $ this -> data , $ arr ) ) ) ; }
Removes any values that are not present in the given array or collection. Returns a new Collection.
@param mixed[]|\CharlotteDunois\Collect\Collection  $arr
@return \CharlotteDunois\Collect\Collection
Removes any values that are not present in the given array or collection . Returns a new Collection .