for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Packagist Mirror.
*
* For the full license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace Webs\Mirror;
/**
* Trait to shortname of package.
* @author Webysther Nunes <[email protected]>
trait ShortName
{
* Find hash and replace by *.
* @param string $name Name of provider or package
* @return string Shortname
protected function shortname(string $name):string
return str_replace('*', '$*', preg_replace('/\$(\w*)/', '*', $name));
}