protected static function mapRootExtra(array $packageExtra, $packagePrettyName)
    {
        if (isset($packageExtra[$packagePrettyName])) {
            return $packageExtra[$packagePrettyName];
        }

        if (strpos($packagePrettyName, '/') !== false) {
            list($vendor, $name) = explode('/', $packagePrettyName);
        } else {
            $vendor = '';
            $name = $packagePrettyName;
        }

        foreach ($packageExtra as $key => $value) {
            if ((substr($key, 0, 5) === 'name:') && (substr($key, 5) === $name)) {
                return $value;
            } elseif ((substr($key, 0, 7) === 'vendor:') && (substr($key, 7) === $vendor)) {
                return $value;
            }
        }

        return null;
    }
protected static function mapRootExtra(array $packageExtra, $packagePrettyName)
    {
        if (isset($packageExtra[$packagePrettyName])) {
            return $packageExtra[$packagePrettyName];
        }

        if (strpos($packagePrettyName, '/') !== false) {
            list($vendor, $name) = explode('/', $packagePrettyName);
        } else {
            $vendor = '';
            $name = $packagePrettyName;
        }

        foreach ($packageExtra as $key => $value) {
            if ((substr($key, 0, 5) === 'name:') && (substr($key, 5) === $name)) {
                return $value;
            } elseif ((substr($key, 0, 7) === 'vendor:') && (substr($key, 7) === $vendor)) {
                return $value;
            }
        }

        return null;
    }
protected static function mapRootExtra ( array $ packageExtra , $ packagePrettyName ) { if ( isset ( $ packageExtra [ $ packagePrettyName ] ) ) { return $ packageExtra [ $ packagePrettyName ] ; } if ( strpos ( $ packagePrettyName , '/' ) !== false ) { list ( $ vendor , $ name ) = explode ( '/' , $ packagePrettyName ) ; } else { $ vendor = '' ; $ name = $ packagePrettyName ; } foreach ( $ packageExtra as $ key => $ value ) { if ( ( substr ( $ key , 0 , 5 ) === 'name:' ) && ( substr ( $ key , 5 ) === $ name ) ) { return $ value ; } elseif ( ( substr ( $ key , 0 , 7 ) === 'vendor:' ) && ( substr ( $ key , 7 ) === $ vendor ) ) { return $ value ; } } return null ; }
Maps the root package's extra data to a package

Besides matching the exact package name, you can also use the `vendor:`
or `name:` prefixes to match all packages of a specific vendor resp.
all packages with a specific name, no matter the vendor.

@param  mixed[] $packageExtra
@param  string  $packagePrettyName
@return mixed
Maps the root package s extra data to a package