Skip to content

Commit

Permalink
Fix some php typing
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeyGuyDylan committed Aug 8, 2024
1 parent 24e5b5b commit db9e4c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions projects/packages/my-jetpack/src/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ public static function get_site() {
return new WP_Error( 'site_data_fetch_failed', 'Site data fetch failed', array( 'status' => $response_code ) );
}

return rest_ensure_response( $body, 200 );
return rest_ensure_response( $body );
}

/**
Expand Down Expand Up @@ -664,7 +664,7 @@ public static function get_site_info() {
/**
* Returns whether a site has been determined "commercial" or not.
*
* @return bool
* @return bool|null
*/
public static function is_commercial_site() {
if ( is_wp_error( self::$site_info ) ) {
Expand All @@ -690,7 +690,7 @@ public static function is_registered() {
*/
public static function dismiss_welcome_banner() {
\Jetpack_Options::update_option( 'dismissed_welcome_banner', true );
return rest_ensure_response( array( 'success' => true ), 200 );
return rest_ensure_response( array( 'success' => true ) );
}

/**
Expand Down
6 changes: 3 additions & 3 deletions projects/packages/my-jetpack/src/class-rest-product-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ public static function get_site_backup_undo_event() {
}
}

return rest_ensure_response( $undo_event, 200 );
return rest_ensure_response( $undo_event );
}

/**
* This will collect a count of all the items that could be backed up
* This is used to show what backup could be doing if it is not enabled
*
* @return array
* @return WP_Error|\WP_REST_Response
*/
public static function count_things_that_can_be_backed_up() {
$image_mime_type = 'image';
Expand Down Expand Up @@ -142,6 +142,6 @@ public static function count_things_that_can_be_backed_up() {
// Add all audio attachments together to get the total audio count
$data['total_audio_count'] = array_sum( (array) wp_count_attachments( $audio_mime_type ) );

return rest_ensure_response( $data, 200 );
return rest_ensure_response( $data );
}
}

0 comments on commit db9e4c3

Please sign in to comment.