function JsonConfigSource::removeLink
@inheritDoc
Overrides ConfigSourceInterface::removeLink
File
-
vendor/
composer/ composer/ src/ Composer/ Config/ JsonConfigSource.php, line 195
Class
- JsonConfigSource
- JSON Configuration Source
Namespace
Composer\ConfigCode
public function removeLink(string $type, string $name) : void {
$this->manipulateJson('removeSubNode', static function (&$config, $type, $name) : void {
unset($config[$type][$name]);
}, $type, $name);
$this->manipulateJson('removeMainKeyIfEmpty', static function (&$config, $type) : void {
if (0 === count($config[$type])) {
unset($config[$type]);
}
}, $type);
}