Created = new DateTimeImmutable('@' . $unixTimestamp); } catch(\Exception){ throw new Exceptions\InvalidGitCommitException('Invalid timestamp for Git commit.'); } $instance->Message = $message; $instance->Hash = $hash; return $instance; } }