public static function formatPackage(PackageInterface $package, $packageName, array $packageValue)
    {
        $packageValue['name'] = $packageName;

        if (!isset($packageValue['version'])) {
            $extra = $package->getExtra();
            $version = $package->getPrettyVersion();

            if (0 === strpos($version, 'dev-') && isset($extra['branch-alias'][$version])) {
                $version = $extra['branch-alias'][$version];
            }

            $packageValue['version'] = self::formatVersion(str_replace('-dev', '', $version));
        }

        return $packageValue;
    }