protected function includeBranchAlias(VcsDriverInterface $driver, PackageInterface $package, $branch)
    {
        if (null !== $this->rootPackageVersion && $branch === $driver->getRootIdentifier()) {
            $aliasNormalized = $this->normalizeBranchAlias($package);
            $package = $package instanceof AliasPackage ? $package->getAliasOf() : $package;
            $package = $this->overrideBranchAliasConfig($package, $aliasNormalized, $branch);
            $package = $this->addPackageAliases($package, $aliasNormalized);
        }

        return $package;
    }
protected function includeBranchAlias(VcsDriverInterface $driver, PackageInterface $package, $branch)
    {
        if (null !== $this->rootPackageVersion && $branch === $driver->getRootIdentifier()) {
            $aliasNormalized = $this->normalizeBranchAlias($package);
            $package = $package instanceof AliasPackage ? $package->getAliasOf() : $package;
            $package = $this->overrideBranchAliasConfig($package, $aliasNormalized, $branch);
            $package = $this->addPackageAliases($package, $aliasNormalized);
        }

        return $package;
    }
protected function includeBranchAlias ( VcsDriverInterface $ driver , PackageInterface $ package , $ branch ) { if ( null !== $ this -> rootPackageVersion && $ branch === $ driver -> getRootIdentifier ( ) ) { $ aliasNormalized = $ this -> normalizeBranchAlias ( $ package ) ; $ package = $ package instanceof AliasPackage ? $ package -> getAliasOf ( ) : $ package ; $ package = $ this -> overrideBranchAliasConfig ( $ package , $ aliasNormalized , $ branch ) ; $ package = $ this -> addPackageAliases ( $ package , $ aliasNormalized ) ; } return $ package ; }
Include the package in the alias package if the branch is a root branch
identifier and having a package version.

@param VcsDriverInterface $driver  The vcs driver
@param PackageInterface   $package The package instance
@param string             $branch  The branch name

@return AliasPackage|PackageInterface
Include the package in the alias package if the branch is a root branch identifier and having a package version .