// 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
);
$modified_binaries =
[];
foreach ($binaries as $binary) { if (!
in_array($binary,
$unset_these_binaries)) { $modified_binaries[] =
$binary;
} }