Shouldn't this just use new DateTime() instead of passing one in? Alternatively, if you need this for unit testing, do DateTime $date = null in the signature, so one can omit it.