public function __construct(\Closure $closure, MicroDateTime $startedOn, MicroDateTime $endsOn, $results = null) { if (empty($results)) { $results = null; } if (!$startedOn->isBefore($endsOn)) { throw new MicroDateTimeClosureException('The startedOn MicroDateTime must be before the endsOn MicroDateTime.'); } $this->closure = $closure; $this->startedOn = $startedOn; $this->endsOn = $endsOn; $this->results = $results; }