public function reduce(array $keys) : self
    {
        $entries = array_intersect_key($this->getItems()->getArrayCopy(), array_flip(array_values($keys)));
        $this->getItems()->exchangeArray($entries);
        return $this;
    }
public function reduce(array $keys) : self
    {
        $entries = array_intersect_key($this->getItems()->getArrayCopy(), array_flip(array_values($keys)));
        $this->getItems()->exchangeArray($entries);
        return $this;
    }
public function reduce ( array $ keys ) : self { $ entries = array_intersect_key ( $ this -> getItems ( ) -> getArrayCopy ( ) , array_flip ( array_values ( $ keys ) ) ) ; $ this -> getItems ( ) -> exchangeArray ( $ entries ) ; return $ this ; }
Reduce the collection to only provided keys.

Similar to subset, but has the affects this instead of creating a new set.

@param array $keys
@return self
Reduce the collection to only provided keys .