public function trim($log)
{
$period = new \DateTime('-7 day');
if ($log === 'change') {
$this->changeRepository->trimLog($period);
} elseif ($log === 'system') {
$this->systemRepository->trimLog($period);
} else {
throw new \UnexpectedValueException("Invalid log type requested: {$log}");
}
}