protected function getPackageReplacementTokens(PackageInterface $package)
    {
        $vars = array(
          '{$type}' => $package->getType(),
        );

        $prettyName = $package->getPrettyName();
        if (strpos($prettyName, '/') !== false) {
            $pieces = explode('/', $prettyName);
            $vars['{$vendor}'] = $pieces[0];
            $vars['{$name}'] = $pieces[1];

        } else {
            $vars['{$vendor}'] = '';
            $vars['{$name}'] = $prettyName;
        }

        return $vars;
    }
protected function getPackageReplacementTokens(PackageInterface $package)
    {
        $vars = array(
          '{$type}' => $package->getType(),
        );

        $prettyName = $package->getPrettyName();
        if (strpos($prettyName, '/') !== false) {
            $pieces = explode('/', $prettyName);
            $vars['{$vendor}'] = $pieces[0];
            $vars['{$name}'] = $pieces[1];

        } else {
            $vars['{$vendor}'] = '';
            $vars['{$name}'] = $prettyName;
        }

        return $vars;
    }
protected function getPackageReplacementTokens ( PackageInterface $ package ) { $ vars = array ( '{$type}' => $ package -> getType ( ) , ) ; $ prettyName = $ package -> getPrettyName ( ) ; if ( strpos ( $ prettyName , '/' ) !== false ) { $ pieces = explode ( '/' , $ prettyName ) ; $ vars [ '{$vendor}' ] = $ pieces [ 0 ] ; $ vars [ '{$name}' ] = $ pieces [ 1 ] ; } else { $ vars [ '{$vendor}' ] = '' ; $ vars [ '{$name}' ] = $ prettyName ; } return $ vars ; }
Retrieve replacement tokens for the given package.

@param \Composer\Package\PackageInterface $package

@return array
Retrieve replacement tokens for the given package .