src/State.php
public function withStatus(int $status, \DateTime $timeExecuted = null): State
    {
        $state = clone $this;
        $state->status = $status;
        $state->timeExecuted = $timeExecuted;

        return $state;
    }
public function withStatus(int $status, \DateTime $timeExecuted = null): State
    {
        $state = clone $this;
        $state->status = $status;
        $state->timeExecuted = $timeExecuted;

        return $state;
    }
@param int            $status
@param \DateTime|null $timeExecuted

@return State