src/Composer/Command/LicensesCommand.php
public function appendPackages(array $packages, array $bucket)
    {
        foreach ($packages as $package) {
            $bucket[$package->getName()] = $package;
        }

        return $bucket;
    }
public function appendPackages(array $packages, array $bucket)
    {
        foreach ($packages as $package) {
            $bucket[$package->getName()] = $package;
        }

        return $bucket;
    }
Adds packages to the package list

@param  array $packages the list of packages to add
@param  array $bucket   the list to add packages to
@return array