protected function bins($names)
{
/** @var \Xpressengine\Trash\TrashManager $trashManager */
$trashManager = app('xe.trash');
$bins = [];
if ($names !== null) {
foreach (explode(',', $names) as $name) {
$bins[] = $trashManager->get($name);
}
} else {
$bins = $trashManager->bins();
}
if (count($bins) == 0) {
$this->error('There is no recycle bin to be processed.');
}
return $bins;
}