Assess the safeness of given map in contexts

@param  array $map
@return void
548781
protected function assessSafeness(array $map)
	{
		// Concatenate the values so we can check them as a single string
		$values = implode('', $map);

		// Test whether the values contain any character that's disallowed in CSS
		$isSafeInCSS = true;
		foreach (ContextSafeness::getDisallowedCharactersInCSS() as $char)
		{
			if (strpos($values, $char) !== false)
			{
				$isSafeInCSS = false;
				break;
			}
		}
		if ($isSafeInCSS)
		{
			$this->markAsSafeInCSS();
		}

		// Test whether the values contain any character that's disallowed in JS
		$isSafeInJS = true;
		foreach (ContextSafeness::getDisallowedCharactersInJS() as $char)
		{
			if (strpos($values, $char) !== false)
			{
				$isSafeInJS = false;
				break;
			}
		}
		if ($isSafeInJS)
		{
			$this->markAsSafeInJS();
		}
	}
1197296
public function load(Map $map)
    {

        $this->changedRatings = [];
        $this->ratingsPerPlayer = [];
        MapratingTableMap::clearInstancePool();

        /** @var Maprating[] $ratings */
        $ratings = $this->mapratingQueryBuilder->getRatingsForMap($map);

        foreach ($ratings as $rating) {
            $this->ratingsPerPlayer[$rating->getLogin()] = $rating;
        }

        $this->dispatcher->dispatch("expansion.mapratings.loaded", [$this->ratingsPerPlayer]);
    }
702197
protected function optimizeLooseMap(array $map)
	{
		foreach ($map as $k => $v)
		{
			if ($k === $v)
			{
				unset($map[$k]);
			}
		}

		return $map;
	}
156921
public function putAll($map)
    {
        foreach ($map as $key => $val) {
            $this->put($key, $val);
        }

        return $this;
    }
590019
public function collect(Map $map, array $bounds = [])
    {
        if ($map->isAutoZoom()) {
            $bounds = $this->collectValue($map->getBound(), $bounds);
        }

        foreach ($this->groundOverlayCollector->collect($map) as $groundOverlay) {
            $bounds = $this->collectValue($groundOverlay->getBound(), $bounds);
        }

        foreach ($this->rectangleCollector->collect($map) as $rectangle) {
            $bounds = $this->collectValue($rectangle->getBound(), $bounds);
        }

        return $bounds;
    }
195868
protected function _validateAndCompleteOneToOneMapping(array $mapping)
    {
        $mapping = $this->_validateAndCompleteAssociationMapping($mapping);

        if (isset($mapping['joinColumns']) && $mapping['joinColumns']) {
            $mapping['isOwningSide'] = true;
        }

        if ($mapping['isOwningSide']) {
            if ( ! isset($mapping['joinColumns']) || ! $mapping['joinColumns']) {
                // Apply default join column
                $mapping['joinColumns'] = array(array(
                    'name' => $this->namingStrategy->joinColumnName($mapping['fieldName'], $this->name),
                    'referencedColumnName' => $this->namingStrategy->referenceColumnName()
                ));
            }

            $uniqueConstraintColumns = array();
            foreach ($mapping['joinColumns'] as &$joinColumn) {
                if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) {
                    if (count($mapping['joinColumns']) == 1) {
                        if ( ! isset($mapping['id']) || ! $mapping['id']) {
                            $joinColumn['unique'] = true;
                        }
                    } else {
                        $uniqueConstraintColumns[] = $joinColumn['name'];
                    }
                }

                if (empty($joinColumn['name'])) {
                    $joinColumn['name'] = $this->namingStrategy->joinColumnName($mapping['fieldName'], $this->name);
                }

                if (empty($joinColumn['referencedColumnName'])) {
                    $joinColumn['referencedColumnName'] = $this->namingStrategy->referenceColumnName();
                }

                if ($joinColumn['name'][0] === '`') {
                    $joinColumn['name']   = trim($joinColumn['name'], '`');
                    $joinColumn['quoted'] = true;
                }

                if ($joinColumn['referencedColumnName'][0] === '`') {
                    $joinColumn['referencedColumnName'] = trim($joinColumn['referencedColumnName'], '`');
                    $joinColumn['quoted']               = true;
                }

                $mapping['sourceToTargetKeyColumns'][$joinColumn['name']] = $joinColumn['referencedColumnName'];
                $mapping['joinColumnFieldNames'][$joinColumn['name']] = isset($joinColumn['fieldName'])
                        ? $joinColumn['fieldName'] : $joinColumn['name'];
            }

            if ($uniqueConstraintColumns) {
                if ( ! $this->table) {
                    throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship.");
                }
                $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array(
                    'columns' => $uniqueConstraintColumns
                );
            }

            $mapping['targetToSourceKeyColumns'] = array_flip($mapping['sourceToTargetKeyColumns']);
        }

        $mapping['orphanRemoval']   = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false;
        $mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove'];

        if ($mapping['orphanRemoval']) {
            unset($mapping['unique']);
        }

        if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
            throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']);
        }

        return $mapping;
    }
891157
public function setLockMapping(array &$mapping) : void
    {
        if ($mapping['type'] !== 'int') {
            throw LockException::invalidLockFieldType($mapping['type']);
        }

        $this->isLockable = true;
        $this->lockField  = $mapping['fieldName'];
    }
916534
private function addRoutes(Map $map)
    {
        $data = $this->getParsedData();
        $routes = (array_key_exists('routes', $data))
            ? $data['routes']
            : [];
        foreach ($routes as $name => $definition) {
            $this->routeFactory->parse($name, $definition, $map);
        }
    }
738368
public function save($fileName, $values, $map = null) {
		if ($map !== null) {
			$output = $this->createOutputWithMap($values,$map);
		} else {
			$output = $this->createOutput($values);
		}

		$this->saveToFile($fileName, $output);
	}
568412
public function setDiscriminatorMap(array $map)
    {
        foreach ($map as $value => $className) {
            $this->discriminatorMap[$value] = $className;
            if ($this->name == $className) {
                $this->discriminatorValue = $value;
            } else {
                if (!class_exists($className)) {
                    throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
                }
                if (is_subclass_of($className, $this->name)) {
                    $this->subClassNames[] = $className;
                }
            }
        }
    }
281912
public function setMap(array $map, $strict = false)
	{
		if (!is_bool($strict))
		{
			throw new InvalidArgumentException('Argument 2 passed to ' . __METHOD__ . ' must be a boolean');
		}

		// If the map is not strict, we can optimize away the values that are identical to their key
		if (!$strict)
		{
			$map = $this->optimizeLooseMap($map);
		}

		// Sort the map so it looks tidy
		ksort($map);

		// Record this filter's variables
		$this->vars['map']    = new Dictionary($map);
		$this->vars['strict'] = $strict;

		// Evaluate safeness
		$this->resetSafeness();
		if (!empty($this->vars['strict']))
		{
			$this->evaluateSafenessInCSS();
			$this->evaluateSafenessInJS();
		}
	}
197838
protected function isRequireAssociation(array $mapping)
    {
        $ref = new \ReflectionClass($mapping['sourceEntity']);

        if (\in_array(RoleHierarchicalInterface::class, $ref->getInterfaceNames(), true)
                && 'children' === $mapping['fieldName']) {
            return true;
        }

        if (\in_array(GroupableInterface::class, $ref->getInterfaceNames(), true)
                && 'groups' === $mapping['fieldName']) {
            return true;
        }

        return false;
    }
344157
private function setDefaults(Map $map)
    {
        foreach ($this->getParsedData() as $name => $value) {
            if (in_array($name, $this->defaults)) {
                $map->$name($value);
            }
        }
    }
138040
public function reset(Map $map)
    {
        $this->pluginManager->reset($map);
        $this->dataProviderManager->reset($this->pluginManager, $map);
    }
859716
public function mapParameter(array $mapping)
    {
        if (isset($this->fieldMappings[$mapping['parameterName']])) {
            throw MappingException::duplicateParameterMapping($this->className, $mapping['parameterName']);
        }
        $this->parameters[$mapping['parameterName']] = $mapping;
    }
596801
public function extend_fieldmap($map)
    {
        if (is_array($map)) {
            self::$fieldmap = array_merge($map, self::$fieldmap);
        }
    }
71160
function (map, array) {
                if (map == null)
                    return;
                for (var i in map) {
                    var item = map[i];
                    var key = item.key;
                    if (map == this._objectKeys) {
                        key[this._metaDataName] = null;
                        delete item.key[this._metaDataName];
                    }
                    while (item) {
                        array.push(item.value);
                        item.value = null;
                        item.key = null;
                        var next = item.next;
                        item.next = null;
                        item = next;
                    }
                    map[i] = null;
                    delete map[i];
                }
            }