Fix phpcd

This commit is contained in:
emilicastells 2022-12-08 14:18:03 +01:00
parent b161b8cfb5
commit e3dc563a6f
No known key found for this signature in database
GPG key ID: 1520C07081754570
5 changed files with 20 additions and 8 deletions

View file

@ -208,7 +208,15 @@ class PaymentTokenEndpoint {
return wp_remote_retrieve_response_code( $response ) === 204;
}
public function delete_token_by_id(string $token_id): bool {
/**
* Deletes payment token by the given id.
*
* @param string $token_id Token id.
* @return bool
*
* @throws RuntimeException If something goes wrong while deleting the token.
*/
public function delete_token_by_id( string $token_id ): bool {
$bearer = $this->bearer->bearer();
$url = trailingslashit( $this->host ) . 'v2/vault/payment-tokens/' . $token_id;
@ -226,7 +234,7 @@ class PaymentTokenEndpoint {
$error = new RuntimeException(
__( 'Could not delete payment token.', 'woocommerce-paypal-payments' )
);
$this->logger->warning($error->getMessage());
$this->logger->warning( $error->getMessage() );
throw $error;
}