Skip to content

Commit

Permalink
Add missing return types
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemd24 committed Mar 5, 2024
1 parent 7f3e1f5 commit 6848100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DB/Table/MerchantIssueTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function get_raw_name(): string {
*
* @param DateTime $created_before Delete all records created before this.
*/
public function delete_stale( DateTime $created_before ) {
public function delete_stale( DateTime $created_before ): void {
$query = "DELETE FROM `{$this->get_sql_safe_name()}` WHERE `created_at` < '%s'";
$this->wpdb->query( $this->wpdb->prepare( $query, $created_before->format( 'Y-m-d H:i:s' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL
}
Expand All @@ -67,7 +67,7 @@ public function delete_stale( DateTime $created_before ) {
* @param array $products_ids Array of product IDs to delete issues for.
* @param string $source The source of the issues. Default is 'mc'.
*/
public function delete_specific_product_issues( array $products_ids, string $source = 'mc' ) {
public function delete_specific_product_issues( array $products_ids, string $source = 'mc' ): void {
$placeholder = '(' . implode( ',', array_fill( 0, count( $products_ids ), '%d' ) ) . ')';
$this->wpdb->query( $this->wpdb->prepare( "DELETE FROM `{$this->get_sql_safe_name()}` WHERE `product_id` IN {$placeholder} AND `source` = %s", array_merge( $products_ids, [ $source ] ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL
}
Expand Down
2 changes: 1 addition & 1 deletion src/MerchantCenter/MerchantStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ protected function delete_product_statuses_count_intermediate_data(): void {
*
* @since x.x.x
*/
protected function delete_stale_issues() {
protected function delete_stale_issues(): void {
$this->container->get( MerchantIssueTable::class )->delete_stale( $this->cache_created_time );
}

Expand Down

0 comments on commit 6848100

Please sign in to comment.