src/Map.php
public function intersect(MapInterface $map)
    {
        return new self(array_intersect_assoc($this->map, $map->getMapData()), $this->logger);
    }
public function intersect(MapInterface $map)
    {
        return new self(array_intersect_assoc($this->map, $map->getMapData()), $this->logger);
    }
Compare $map to this instance and return a new MapInterface.

Returned object will contain only the elements that match between the two maps. If this map
has a logger, it will be passed to the new map.

@param MapInterface $map

@return MapInterface