From e68ff575729b6b52de2b47f53719eb435bd30f08 Mon Sep 17 00:00:00 2001 From: dinamiko Date: Wed, 5 Jan 2022 14:56:30 +0100 Subject: [PATCH] Fix psalm --- .../ppcp-api-client/src/Repository/CustomerRepository.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ppcp-api-client/src/Repository/CustomerRepository.php b/modules/ppcp-api-client/src/Repository/CustomerRepository.php index 9f21a2959..d703851ef 100644 --- a/modules/ppcp-api-client/src/Repository/CustomerRepository.php +++ b/modules/ppcp-api-client/src/Repository/CustomerRepository.php @@ -31,7 +31,7 @@ class CustomerRepository { } /** - * Returns a unique ID for the given user ID. + * Returns the customer ID for the given user ID. * * @param int $user_id The user ID. * @return string @@ -39,9 +39,9 @@ class CustomerRepository { public function customer_id_for_user( int $user_id ): string { $guest_customer_id = get_user_meta( $user_id, 'ppcp_guest_customer_id', true ); if ( $guest_customer_id ) { - return $this->prefix . $guest_customer_id; + return $this->prefix . $guest_customer_id; } - return $this->prefix . $user_id; + return $this->prefix . (string) $user_id; } }