Skip to content

Commit

Permalink
Fix some PHPStan issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Mar 14, 2024
1 parent 4eb5b42 commit 8ff7161
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ public static function new_payment_from_rcp_gateway( $gateway ) {
$subscription = self::new_subscription_from_rcp_gateway( $gateway );

if ( null !== $subscription ) {
$payment->add_period( $subscription->new_period() );
$new_period = $subscription->new_period();

if ( null !== $new_period ) {
$payment->add_period( $new_period );
}
}

/**
Expand Down Expand Up @@ -106,7 +110,7 @@ public static function new_payment_from_rcp_gateway( $gateway ) {
* @link https://github.com/wp-pay-extensions/woocommerce/blob/develop/src/Gateway.php
*
* @param RCP_Payment_Gateway $gateway Restrict Content Pro gateway object.
* @return Payment
* @return Customer
*/
public static function new_customer_from_rcp_gateway( $gateway ) {
// Contact name.
Expand Down Expand Up @@ -286,7 +290,7 @@ public static function new_subscription_from_rcp_gateway( $gateway ) {

/**
* Store payment ID in Restrict Content Pro membership meta.
*
*
* @link https://github.com/pronamic/wp-pronamic-pay-restrict-content-pro/issues/8
* @link https://github.com/pronamic/wp-pronamic-pay-woocommerce/blob/8d32295882ac2c4b0c3d3adc6c8355eb13916edb/src/Gateway.php#L446C29-L446C80
* @param int $rcp_membership_id Restrict Content Pro membership ID.
Expand All @@ -299,7 +303,7 @@ public static function connect_pronamic_payment_id_to_rcp_payment( $rcp_membersh

/**
* Store payment ID in Restrict Content Pro payment meta.
*
*
* @link https://github.com/pronamic/wp-pronamic-pay-restrict-content-pro/issues/8
* @link https://github.com/pronamic/wp-pronamic-pay-woocommerce/blob/8d32295882ac2c4b0c3d3adc6c8355eb13916edb/src/Gateway.php#L446C29-L446C80
* @param int $rcp_payment_id Restrict Content Pro payment ID.
Expand Down

0 comments on commit 8ff7161

Please sign in to comment.