Created = new DateTimeImmutable('@' . $unixTimestamp); } catch(\Exception){ throw new Exceptions\InvalidGitCommitException('Invalid timestamp for Git commit.'); } $instance->Message = $message; $instance->Hash = $hash; return $instance; } public function Create(): void{ Db::Query(' INSERT into GitCommits (EbookId, Created, Message, Hash) values (?, ?, ?, ?) ', [$this->EbookId, $this->Created, $this->Message, $this->Hash]); $this->GitCommitId = Db::GetLastInsertedId(); } }