public function GravInstaller::inflectPackageVars in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/composer/installers/src/Composer/Installers/GravInstaller.php \Composer\Installers\GravInstaller::inflectPackageVars()
Format package name
Parameters
array $vars:
Return value
array
Overrides BaseInstaller::inflectPackageVars
File
- vendor/
composer/ installers/ src/ Composer/ Installers/ GravInstaller.php, line 18
Class
Namespace
Composer\InstallersCode
public function inflectPackageVars($vars) {
$restrictedWords = implode('|', array_keys($this->locations));
$vars['name'] = strtolower($vars['name']);
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:' . $restrictedWords . ')-)?(.*?)(?:-(?:' . $restrictedWords . '))?$/ui', '$1', $vars['name']);
return $vars;
}