Skip to content

Commit

Permalink
fixing linting error (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspercroome authored Apr 16, 2024
1 parent 237427d commit fd0a7af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions client-mu-plugins/goodbids/src/classes/Auctions/Auctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Auctions {
* @since 1.0.0
* @var string
*/
const CRON_AUCTION_ENDING_SOON_CHECK_HOOK = 'goodbids_auction_ending_soon_event'
const CRON_AUCTION_ENDING_SOON_CHECK_HOOK = 'goodbids_auction_ending_soon_event';

/**
* @since 1.0.0
Expand Down Expand Up @@ -426,7 +426,7 @@ public function get_auctions_ending_soon($threshold_start, $threshold_end): arra
'compare'=>'<='
],
]
]
];
$ending_soon = $this->get_all( $query_args );

return $ending_soon-> posts;
Expand All @@ -441,13 +441,16 @@ public function get_auctions_ending_soon($threshold_start, $threshold_end): arra
* @return array
*/
public function get_auctions_ending_soon_emails(): array {
$threshold_start = new DateTime()->modify('+3 hours') // TODO update to dynamic values (1/3 of auction extension window)
$threshold_end = new DateTime()->modify('+4 hours') // TODO update to dynamic values (1/3 of auction extension window)
$threshold_start = new DateTime(); // Create a new DateTime object with the current time
$threshold_start->modify('+3 hours'); // Modify the DateTime object by adding 3 hours
$threshold_end = new DateTime(); // Create a new DateTime object with the current time
$threshold_end->modify('+4 hours'); // Modify the DateTime object by adding 3 hours

$ending_soon_emails = [];

$ending_soon = $this->get_auctions_ending_soon($threshold_start, $threshold_end)
$ending_soon = $this->get_auctions_ending_soon($threshold_start, $threshold_end);

if (count($ending_soon)){
if (count($ending_soon)) {
array_push( $ending_soon_emails, ...$ending_soon );
}
return $ending_soon_emails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function (): void {
$this->send_to_watchers( $auction );
}
}
)
);
}

/**
Expand Down

0 comments on commit fd0a7af

Please sign in to comment.