Skip to content

Commit

Permalink
Appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeatorres committed Feb 12, 2024
1 parent 2dc815b commit 6576bc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ public function backfill( array $args = array(), array $assoc_args = array() ) {

foreach ( array( 'from', 'to' ) as $datastore ) {
if ( ! in_array( ${"$datastore"}, array( 'posts', 'hpos' ), true ) ) {
// translators: %s is a shell argument representing a datastore name.
WP_CLI::error( sprintf( __( '\'%s\' is not a valid datastore.', 'woocommerce' ), ${"$datastore"} ) );
}
}
Expand All @@ -1111,6 +1112,7 @@ public function backfill( array $args = array(), array $assoc_args = array() ) {
} catch ( \Exception $e ) {
WP_CLI::error(
sprintf(
// translators: %1$d is an order ID, %2$s and %3$s are datastore names, %4$s is an error message.
__( 'An error occurred while backfilling order %1$d from %2$s to %3$s: %4$s', 'woocommerce' ),
$order_id,
$from,
Expand All @@ -1122,7 +1124,8 @@ public function backfill( array $args = array(), array $assoc_args = array() ) {

WP_CLI::success(
sprintf(
__( 'Order %d backfilled from %s to %s.', 'woocommerce' ),
// translators: %1$d is an order ID, %2$s and %3$s are datastore names ("hpos" or "posts" for example).
__( 'Order %1$d backfilled from %2$s to %3$s.', 'woocommerce' ),
$order_id,
$from,
$to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class LegacyDataHandler {
/**
* Class initialization, invoked by the DI container.
*
* @param OrdersTableDataStore $data_store HPOS datastore instance to use.
* @param DataSynchronizer $data_synchronizer DataSynchronizer instance to use.
* @param OrdersTableDataStore $data_store HPOS datastore instance to use.
* @param DataSynchronizer $data_synchronizer DataSynchronizer instance to use.
* @param PostsToOrdersMigrationController $posts_to_cot_migrator Posts to HPOS migration controller instance to use.
*
* @internal
*/
Expand Down

0 comments on commit 6576bc9

Please sign in to comment.