Skip to content

Commit

Permalink
Fix some WPCS 3 warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Aug 22, 2023
1 parent c662342 commit 4d7729a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static function payment_gateways( $wc_gateways ) {
/**
* Register blocks payment method types.
*
* @param PaymentMethodRegistry $payment_method_registry
* @param PaymentMethodRegistry $payment_method_registry Payment method registery.
* @return void
*/
public static function blocks_payment_method_type_registration( PaymentMethodRegistry $payment_method_registry ) {
Expand Down
9 changes: 5 additions & 4 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public function init_form_fields() {
*
* @param int $order_id WooCommerce order ID.
* @return array
* @throws \Exception Throws exception if the payment cannot be initiated.
*/
public function process_payment( $order_id ) {
// Gateway.
Expand Down Expand Up @@ -478,7 +479,7 @@ public function process_payment( $order_id ) {
/**
* New Pronamic payment from WooCommerce order.
*
* @param WC_Order $order
* @param WC_Order $order Order.
* @return Payment
*/
private function new_pronamic_payment_from_wc_order( WC_Order $order ) {
Expand Down Expand Up @@ -845,9 +846,9 @@ public function maybe_add_subscriptions_support() {
/**
* Process refund.
*
* @param int $order_id
* @param float|null $amount
* @param string $reason
* @param int $order_id Order ID.
* @param float|null $amount Amount.
* @param string $reason Reason.
* @return bool|\WP_Error
*/
public function process_refund( $order_id, $amount = null, $reason = '' ) {
Expand Down
3 changes: 3 additions & 0 deletions src/OrderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use WC_Order;
use WC_Tax;

/**
* Order helper class
*/
class OrderHelper {
/**
* WooCommerce order.
Expand Down
3 changes: 3 additions & 0 deletions src/SubscriptionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
use Pronamic\WordPress\Pay\Subscriptions\Subscription;
use WC_Subscription;

/**
* Subscription helper class
*/
class SubscriptionHelper {
/**
* WooCommerce subscription.
Expand Down
5 changes: 4 additions & 1 deletion src/SubscriptionUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Pronamic\WordPress\Pay\Subscriptions\SubscriptionPhase;
use WC_Subscription;

/**
* Subscription updater class
*/
class SubscriptionUpdater {
/**
* WooCommerce subscription.
Expand Down Expand Up @@ -180,7 +183,7 @@ public function update_pronamic_subscription() {

$pronamic_subscription->set_next_payment_date( empty( $next_date ) ? null : new \DateTimeImmutable( $next_date ) );

// Lines
// Lines.
$pronamic_subscription->lines = $order_helper->get_lines();
}

Expand Down
8 changes: 3 additions & 5 deletions src/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ public static function get_order_pay_url( $order ) {
/**
* Add notice.
*
* @param string $message
* @param string $type
* @param string $message Message.
* @param string $type Type.
* @return void
*/
public static function add_notice( $message, $type = 'success' ) {
Expand Down Expand Up @@ -222,9 +222,7 @@ public static function order_has_status( $order, $status ) {
* Get order status.
*
* @since 1.2.1
*
* @param WC_Order $order
*
* @param WC_Order $order Order.
* @return string
*/
public static function order_get_status( $order ) {
Expand Down

0 comments on commit 4d7729a

Please sign in to comment.