protected function removeBinBeforeCleanup(BasePackage
$package) { // We can process AliasPackage and Package objects, and they share the
// BasePackage parent class. However, since there is no common interface for
// these package types that allow for the setBinaries() method, and since
// BasePackage does not include the setBinaries() method, we have to make
// sure we're processing a class with a setBinaries() method.
if (!
method_exists($package, 'setBinaries'
)) { return;
} $binaries =
$package->
getBinaries();
$clean_paths =
$this->config->
getPathsForPackage($package->
getName());
// Only do this if there are binaries and cleanup paths.
if (!
$binaries || !
$clean_paths) { return;
} if ($unset_these_binaries =
$this->
findBinOverlap($binaries,
$clean_paths)) { $this->io->
writeError( sprintf('%sModifying bin config for <info>%s</info> which overlaps with cleanup directories.',
str_repeat(' ', 4
),
$package->
getName()),
TRUE,
IOInterface::VERBOSE
);