mirror of
https://github.com/standardebooks/web.git
synced 2025-07-10 00:30:28 -04:00
Use the NOW
constant from eec7971
This commit is contained in:
parent
df8eac6f82
commit
65d1dcdd88
6 changed files with 6 additions and 21 deletions
|
@ -30,9 +30,6 @@ class GitCommit{
|
|||
* @throws Exceptions\ValidationException
|
||||
*/
|
||||
public function Validate(): void{
|
||||
/** @throws void */
|
||||
$now = new DateTimeImmutable();
|
||||
|
||||
$error = new Exceptions\ValidationException();
|
||||
|
||||
if(!isset($this->EbookId)){
|
||||
|
@ -40,7 +37,7 @@ class GitCommit{
|
|||
}
|
||||
|
||||
if(isset($this->Created)){
|
||||
if($this->Created > $now){
|
||||
if($this->Created > NOW){
|
||||
$error->Add(new Exceptions\InvalidGitCommitCreatedDatetimeException($this->Created));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue