protected static function guessInstallName($packageName)
    {
        $name = $packageName;
        if (strpos($packageName, '/') !== false) {
            list(, $name) = explode('/', $packageName);
        }

        $name = preg_replace('/[\.\-_]+(?>plugin|theme)$/u', '', $name);
        $name = preg_replace_callback(
            '/(?>^[\.\-_]*|[\.\-_]+)(.)/u',
            function ($matches) {
                return strtoupper($matches[1]);
            },
            $name
        );

        return $name;
    }
protected static function guessInstallName($packageName)
    {
        $name = $packageName;
        if (strpos($packageName, '/') !== false) {
            list(, $name) = explode('/', $packageName);
        }

        $name = preg_replace('/[\.\-_]+(?>plugin|theme)$/u', '', $name);
        $name = preg_replace_callback(
            '/(?>^[\.\-_]*|[\.\-_]+)(.)/u',
            function ($matches) {
                return strtoupper($matches[1]);
            },
            $name
        );

        return $name;
    }
protected static function guessInstallName ( $ packageName ) { $ name = $ packageName ; if ( strpos ( $ packageName , '/' ) !== false ) { list ( , $ name ) = explode ( '/' , $ packageName ) ; } $ name = preg_replace ( '/[\.\-_]+(?>plugin|theme)$/u' , '' , $ name ) ; $ name = preg_replace_callback ( '/(?>^[\.\-_]*|[\.\-_]+)(.)/u' , function ( $ matches ) { return strtoupper ( $ matches [ 1 ] ) ; } , $ name ) ; return $ name ; }
Guesses the install name of a package

The install name of a Pico plugin or theme is guessed by converting the
package name to StudlyCase and removing "-plugin" or "-theme" suffixes,
if present.

@param  string $packageName
@return string
Guesses the install name of a package