Skip to content

Commit

Permalink
Fix "Unreachable statement - code above always terminates.".
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed May 6, 2024
1 parent 0bc3d2d commit 7247de0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ public function wp_cli_payments( $args, $assoc_args ) {

if ( empty( $api_key ) ) {
\WP_CLI::error( 'This command requires an API key for authentication' );

return;
}

$client = new Client( $api_key );
Expand Down Expand Up @@ -403,14 +401,10 @@ public function wp_cli_payments_cancel( $args, $assoc_args ) {

if ( empty( $api_key ) ) {
\WP_CLI::error( 'This command requires an API key for authentication' );

return;
}

if ( empty( $args ) ) {
\WP_CLI::error( 'This command requires a transaction ID to cancel payments' );

return;
}

$client = new Client( $api_key );
Expand Down

0 comments on commit 7247de0

Please sign in to comment.