public function setPruneAfter($pruneAfter) { if ($pruneAfter) { // Make sure the string is negative. $now = time(); $testTime = strtotime($pruneAfter, $now); if ($testTime === false) { throw new InvalidArgumentException('Invalid timespan value for "prune after".', 400); } } $this->pruneAfter = $pruneAfter; return $this; }