WordPress at a glance
function is not described

Composer\Installers

GravInstaller::inflectPackageVars() public WC 1.0

Format package name

{} It's a method of the class: GravInstaller{}

No Hooks.

Return

Array. Nothing.

Usage

$GravInstaller = new GravInstaller();
$GravInstaller->inflectPackageVars( $vars );
$vars(array) (required)
-

Code of GravInstaller::inflectPackageVars() WC 5.3.0

<?php
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;
}