src/Map.php
public function add(MapInterface $map)
    {
        $combine = function ($data, $map) {
            foreach ($map as $key => $mask) {
                $data[$key] = empty($data[$key]) ? $mask : ($data[$key] | $mask);
            }

            return $data;
        };

        $maps = array_slice(func_get_args(), 1);
        $data = array_reduce($maps, $combine, $combine($this->map, $map->getMapData()));

        return new self($data, $this->logger);
    }
public function add(MapInterface $map)
    {
        $combine = function ($data, $map) {
            foreach ($map as $key => $mask) {
                $data[$key] = empty($data[$key]) ? $mask : ($data[$key] | $mask);
            }

            return $data;
        };

        $maps = array_slice(func_get_args(), 1);
        $data = array_reduce($maps, $combine, $combine($this->map, $map->getMapData()));

        return new self($data, $this->logger);
    }
Merge this map with another map and return a new MapInterface.

Values in $map will be added to values in this instance.  Any number of additional maps may
be passed to this method, i.e. $map->merge($map2, $map3, $map4, ...);

@param MapInterface $map

@return MapInterface