Update documentation

@throws InvalidArgumentException When configuration file does not exist
@param string $config Configuration to use (either name or full path)
@param bool $full Whether to treat $config as a full path or name
@return string
427665
public function update($config = '', $fullPath = true)
    {
        if (empty($config)) {
            $config = self::CONFIG_DEFAULT;
            $fullPath = false;
        }

        if (!$fullPath) {
            $config = $this->getConfigByName($config);
        }

        if (!file_exists($config)) {
            throw new \InvalidArgumentException("Configuration file [$config] does not exist");
        }

        $result = $this->command . ' update ' . $config;

        return $result;
    }
83735
protected function _initResource($config)
    {
        if (!empty($config['data']) && !empty($config['filename'])) {
            throw new InvalidArgumentException("The `'data'` or `'filename'` option must be defined.");
        }
        if ($config['filename']) {
            $this->_filename = $config['filename'];
            if ($this->_filename === 'php://input') {
                $this->_mode = 'r';
            }
            $this->_resource = fopen($this->_filename, $this->_mode);
            return;
        }
        if (is_resource($config['data'])) {
            $this->_resource = $config['data'];
            return;
        } elseif (is_scalar($config['data'])) {
            $this->_resource = fopen('php://temp', 'r+');
            fwrite($this->_resource, (string) $config['data']);
            rewind($this->_resource);
        }
    }
466309
public static function removeValue(array $config, string $configPath): array
    {
        if (!is_string($configPath) || $configPath === '') {
            throw new InvalidArgumentException('Path must be not be empty string', 1496759385);
        }
        // Extract parts of the path
        $path = str_getcsv($configPath, '.');
        $pathDepth = count($path);
        $currentDepth = 0;
        $pointer = &$config;
        // Find path in given array
        foreach ($path as $segment) {
            $currentDepth++;
            // Fail if the part is empty
            if ($segment === '') {
                throw new InvalidArgumentException('Invalid path segment specified', 1496759389);
            }
            if (!array_key_exists($segment, $pointer)) {
                throw new PathDoesNotExistException(sprintf('Path "%s" does not exist in array (tried removing)', $configPath), 1496759405);
            }
            if ($currentDepth === $pathDepth) {
                unset($pointer[$segment]);
            } else {
                $pointer = &$pointer[$segment];
            }
        }

        return $config;
    }
963119
public static function config($config = null)
	{
		if(is_array($config)) {

            # Setting Configurations
			static::$config = $config + static::$config;
			$pathWithoutTrailingSlash = rtrim(static::$config['directory'], '/');
			static::$config['directory'] = $pathWithoutTrailingSlash.'/';

		} elseif(is_string($config)) {

            # Getting Single Config item
			return isset(static::$config[$config]) ? static::$config[$config] : null;

		} elseif(!$config) {

            # Getting All configurations
			return static::$config;
		} else {
			throw new CacheException('Invalid parameter provided for Cache::config()');
		}
	}
1241408
protected function doConnect($config)
    {
        $connectionString = "mysql:dbname={$config['database']}";
        
        if (isset($config['host'])) {
            $connectionString .= ";host={$config['host']}";
        }
        
        if (isset($config['port'])) {
            $connectionString .= ";port={$config['port']}";
        }

        if (isset($config['unix_socket'])) {
            $connectionString .= ";unix_socket={$config['unix_socket']}";
        }

        $connection = $this->container->build(
            '\PDO',
            array($connectionString, $config['username'], $config['password'], $config['options'])
        );

        if (isset($config['charset'])) {
            $connection->prepare("SET NAMES '{$config['charset']}'")->execute();
        }

        return $connection;
    }
1119523
public function setConfig($name, array $config)
    {
        if (isset($this->configs[$name])) {
            throw new \InvalidArgumentException(sprintf(
                '%s config "%s" already exists.',
                $this->serviceType,
                $name
            ));
        }

        $this->configs[$name] = $config;
    }
508892
public function addConfig($config) {
        if (is_array($config)) {
            // array of paths to config files
            if (array_is_indexed($config)) {
                $this->addPaths($config);
            }
            // array of key value configs
            else {
                $this->addRuntimeConfig($config);
            }
        }
        // path to config file
        else if (is_string($config)) {
            $this->addPath($config);
        }
        // config object
        else if ($config instanceof IConfig) {
            $this->addRuntimeConfig($config);
        }

        return $this;
    }
964180
public function generateFilePath($config)
    {
        $key = $this->generateKey($config);
        return $this->generateDirectoryPath($config) . '/' . $key . '.ser';
    }
1047073
public function update($path, $contents, Config $config)
    {
        list($ret, $err) = Qiniu_RS_Put($this->getClient(), $this->bucket, $path, $contents, null);
        if ($err !== null) {
            return false;
        }
        $mimetype = Util::guessMimeType($path, $contents);
        return compact('mimetype', 'path');
    }
745903
public function setConfig($config)
    {
        if (is_string($config)) {
            // Treat the parameter as a filepath
            $this->config = $this->createConfig($config);
        } elseif (is_array($config)) {
            $this->config = $this->createConfig($config);
        } elseif ($config instanceof ConfigInterface) {
            $this->config = $config;
        } else {
            throw new InvalidArgumentException(sprintf(
                'Configset must be an associative array, a file path, or an instance of %s',
                ConfigInterface::class
            ));
        }

        return $this;
    }
1035638
protected function getORMCompilerPass(array $config)
    {
        $nameSpace = 'Gesdinet\JWTRefreshTokenBundle\Entity';
        $mappings = array(
            realpath(dirname(dirname(__DIR__)).'/Resources/config/orm/doctrine-orm') => $nameSpace,
        );

        if (isset($config['refresh_token_class']) || isset($config['refresh_token_entity'])) {
            $mappings[realpath(dirname(dirname(__DIR__)).'/Resources/config/orm/doctrine-superclass')] = $nameSpace;
        } else {
            $mappings[realpath(dirname(dirname(__DIR__)).'/Resources/config/orm/doctrine-entity')] = $nameSpace;
        }

        return DoctrineOrmMappingsPass::createYamlMappingDriver($mappings);
    }
339308
public function createRequest($config = null)
    {
        if (is_string($config)) {
            $cfg = new ProfileConfiguration();
            $config = $cfg->setTitle($config);
        } elseif (null === $config) {
            $config = new ProfileConfiguration();
        } elseif (!$config instanceof ProfileConfiguration) {
            throw new \InvalidArgumentException(sprintf('The "%s" method takes a string or a Blackfire\Profile\Configuration instance.', __METHOD__));
        }

        return $this->doCreateRequest($config);
    }
658457
public function readExtendedMetadata($meta, array &$config)
    {
        if (!$meta instanceof ExtensibleClassMetadata) {
            return;
        }

        $config = array_merge_recursive($config, $meta->getExtension(
            $this->getExtensionName()
        ));
    }
871365
public static function formatConfig($config)
    {
        if (\is_string($config)) {
            $config = ['file' => $config];
        }

        if (!\is_array($config)) {
            throw new UnexpectedTypeException($config, 'array');
        }

        if (!isset($config['file'])) {
            $msg = 'The "file" attribute must be defined in config of layout template';

            throw new InvalidConfigurationException($msg);
        }

        return $config;
    }
1038693
public static function writeProjectConfigFile($config)
    {
        $configFile = self::getProjectConfigurationFilePath();
        return file_put_contents($configFile, json_encode($config, JSON_PRETTY_PRINT));
    }
1287349
public function setConfiguration(Configuration $config)
    {
        if ($config === null) {
            throw new Exception\InvalidArgumentException('$config cannot be null');
        }


        if ($this->config !== null) {
            $this->config->unregisterConfigChangeListener($this->getConfigChangeListener());
        }

        $this->config = $config;
        $this->setOptions($config->getZendLdapConfiguration());
        $this->config->registerConfigChangeListener($this->getConfigChangeListener());
    }
469315
public function setConfig($config)
    {
        if (!is_array($config) && !$config instanceof ArrayAccess) {
            throw new InvalidArgumentException('Config has to be array or ArrayAccess');
        }
        $this->config = $config;

        return $this;
    }