function JsonManipulator::removeProperty
File
-
vendor/
composer/ composer/ src/ Composer/ Json/ JsonManipulator.php, line 203
Class
- JsonManipulator
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\JsonCode
public function removeProperty(string $name) : bool {
if (strpos($name, 'suggest.') === 0) {
return $this->removeSubNode('suggest', substr($name, 8));
}
if (strpos($name, 'extra.') === 0) {
return $this->removeSubNode('extra', substr($name, 6));
}
if (strpos($name, 'scripts.') === 0) {
return $this->removeSubNode('scripts', substr($name, 8));
}
if (strpos($name, 'autoload.') === 0) {
return $this->removeSubNode('autoload', substr($name, 9));
}
if (strpos($name, 'autoload-dev.') === 0) {
return $this->removeSubNode('autoload-dev', substr($name, 13));
}
return $this->removeMainKey($name);
}