Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inc/checkout/signup-fields/class-base-signup-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function calculate_style_attr() {
* @param array $attributes Array containing settings for the field.
* @return void
*/
public function set_attributes($attributes): void {
public function set_attributes($attributes) {

$this->attributes = $attributes;
}
Expand Down
24 changes: 12 additions & 12 deletions inc/gateways/class-base-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function __construct($order = null) {
* @param \WP_Ultimo\Checkout\Cart $order The order.
* @return void
*/
public function set_order($order): void {
public function set_order($order) {

if (null === $order) {
return;
Expand Down Expand Up @@ -209,7 +209,7 @@ final public function get_id() {
* @param \WP_Ultimo\Models\Membership $membership The membership.
* @return array{brand: string, last4: string}|null Payment method info, or null.
*/
public function get_payment_method_display($membership): ?array {
public function get_payment_method_display($membership) {
unset($membership);
return null;
}
Expand Down Expand Up @@ -568,7 +568,7 @@ public function process_confirmation() {}
* @since 2.0.0
* @return bool
*/
public function supports_payment_polling(): bool {
public function supports_payment_polling() {

return false;
}
Expand All @@ -589,7 +589,7 @@ public function supports_payment_polling(): bool {
* @param int $payment_id The local payment ID to verify.
* @return array{success: bool, status: string, message: string}
*/
public function verify_and_complete_payment(int $payment_id): array {
public function verify_and_complete_payment($payment_id) {

return [
'success' => false,
Expand All @@ -608,7 +608,7 @@ public function verify_and_complete_payment(int $payment_id): array {
* @param string $gateway_payment_id The gateway payment id.
* @return string
*/
public function get_payment_url_on_gateway($gateway_payment_id): string {
public function get_payment_url_on_gateway($gateway_payment_id) {
unset($gateway_payment_id);
return '';
}
Expand All @@ -623,7 +623,7 @@ public function get_payment_url_on_gateway($gateway_payment_id): string {
* @param string $gateway_subscription_id The gateway subscription id.
* @return string
*/
public function get_subscription_url_on_gateway($gateway_subscription_id): string {
public function get_subscription_url_on_gateway($gateway_subscription_id) {
unset($gateway_subscription_id);
return '';
}
Expand All @@ -638,7 +638,7 @@ public function get_subscription_url_on_gateway($gateway_subscription_id): strin
* @param string $gateway_customer_id The gateway customer id.
* @return string
*/
public function get_customer_url_on_gateway($gateway_customer_id): string {
public function get_customer_url_on_gateway($gateway_customer_id) {
unset($gateway_customer_id);
return '';
}
Expand Down Expand Up @@ -816,7 +816,7 @@ public function get_confirm_url() {
* @param string $message The error message.
* @return void
*/
public function redirect_with_error(string $message): void {
public function redirect_with_error($message) {

$url = remove_query_arg(['wu-confirm', 'payment', 'token', 'PayerID', 'ba_token', 'subscription_id', 'status'], $this->return_url ?: wu_get_current_url());

Expand Down Expand Up @@ -853,7 +853,7 @@ public function get_webhook_listener_url() {
* @param \WP_Ultimo\Models\Payment $payment The payment.
* @return void
*/
public function set_payment($payment): void {
public function set_payment($payment) {

$this->payment = $payment;
}
Expand All @@ -865,7 +865,7 @@ public function set_payment($payment): void {
* @param \WP_Ultimo\Models\Membership $membership The membership.
* @return void
*/
public function set_membership($membership): void {
public function set_membership($membership) {

$this->membership = $membership;
}
Expand All @@ -877,7 +877,7 @@ public function set_membership($membership): void {
* @param \WP_Ultimo\Models\Customer $customer The customer.
* @return void
*/
public function set_customer($customer): void {
public function set_customer($customer) {

$this->customer = $customer;
}
Expand All @@ -891,7 +891,7 @@ public function set_customer($customer): void {
* @param \WP_Ultimo\Models\Membership $membership The membership object.
* @return void
*/
public function trigger_payment_processed($payment, $membership = null): void {
public function trigger_payment_processed($payment, $membership = null) {

if (null === $membership) {
$membership = $payment->get_membership();
Expand Down
4 changes: 2 additions & 2 deletions inc/gateways/class-base-paypal-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function get_subscription_description($cart): string {
* @param string $gateway_payment_id The gateway payment id.
* @return string
*/
public function get_payment_url_on_gateway($gateway_payment_id): string {
public function get_payment_url_on_gateway($gateway_payment_id) {

if (empty($gateway_payment_id)) {
return '';
Expand All @@ -152,7 +152,7 @@ public function get_payment_url_on_gateway($gateway_payment_id): string {
* @param string $gateway_subscription_id The gateway subscription id.
* @return string
*/
public function get_subscription_url_on_gateway($gateway_subscription_id): string {
public function get_subscription_url_on_gateway($gateway_subscription_id) {

if (empty($gateway_subscription_id)) {
return '';
Expand Down
12 changes: 6 additions & 6 deletions inc/gateways/class-base-stripe-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ public function get_change_payment_method_url($membership) {
* @param \WP_Ultimo\Models\Membership $membership The membership.
* @return array{brand: string, last4: string}|null Payment method info, or null.
*/
public function get_payment_method_display($membership): ?array {
public function get_payment_method_display($membership) {

try {
$sub_id = $membership->get_gateway_subscription_id();
Expand Down Expand Up @@ -3832,7 +3832,7 @@ public function get_user_saved_payment_methods() {
* @param string $gateway_payment_id The gateway payment id.
* @return string.
*/
public function get_payment_url_on_gateway($gateway_payment_id): string {
public function get_payment_url_on_gateway($gateway_payment_id) {

$route = $this->test_mode ? '/test' : '/';

Expand All @@ -3855,7 +3855,7 @@ public function get_payment_url_on_gateway($gateway_payment_id): string {
* @param string $gateway_subscription_id The gateway subscription id.
* @return string.
*/
public function get_subscription_url_on_gateway($gateway_subscription_id): string {
public function get_subscription_url_on_gateway($gateway_subscription_id) {

$route = $this->test_mode ? '/test' : '/';

Expand All @@ -3872,7 +3872,7 @@ public function get_subscription_url_on_gateway($gateway_subscription_id): strin
* @param string $gateway_customer_id The gateway customer id.
* @return string.
*/
public function get_customer_url_on_gateway($gateway_customer_id): string {
public function get_customer_url_on_gateway($gateway_customer_id) {

$route = $this->test_mode ? '/test' : '/';

Expand All @@ -3883,7 +3883,7 @@ public function get_customer_url_on_gateway($gateway_customer_id): string {
* @inheritdoc
* @since 2.0.0
*/
public function supports_payment_polling(): bool {
public function supports_payment_polling() {

return true;
}
Expand All @@ -3899,7 +3899,7 @@ public function supports_payment_polling(): bool {
* @param int $payment_id The local payment ID to verify.
* @return array{success: bool, message: string, status?: string}
*/
public function verify_and_complete_payment(int $payment_id): array {
public function verify_and_complete_payment($payment_id) {

$payment = wu_get_payment($payment_id);

Expand Down
2 changes: 1 addition & 1 deletion inc/gateways/class-paypal-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,7 @@ public function get_checkout_details($token = '') {
* @param string $gateway_payment_id The gateway payment id.
* @return string
*/
public function get_payment_url_on_gateway($gateway_payment_id): string {
public function get_payment_url_on_gateway($gateway_payment_id) {

return '';
}
Expand Down
4 changes: 2 additions & 2 deletions inc/gateways/class-paypal-rest-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@ public function preserve_oauth_settings(array $settings, array $settings_to_save
* @inheritdoc
* @since 2.0.0
*/
public function supports_payment_polling(): bool {
public function supports_payment_polling() {

return true;
}
Expand All @@ -2107,7 +2107,7 @@ public function supports_payment_polling(): bool {
* @param int $payment_id The local payment ID to verify.
* @return array{success: bool, message: string, status?: string}
*/
public function verify_and_complete_payment(int $payment_id): array {
public function verify_and_complete_payment($payment_id) {

$payment = wu_get_payment($payment_id);

Expand Down
14 changes: 7 additions & 7 deletions inc/integrations/class-base-capability-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ abstract class Base_Capability_Module implements Capability_Module {
* @param string $feature The feature identifier to check.
* @return bool
*/
public function supports(string $feature): bool {
public function supports($feature) {

return in_array($feature, $this->supported_features, true);
}
Expand All @@ -58,44 +58,44 @@ public function supports(string $feature): bool {
* @param Integration $integration The parent integration instance.
* @return void
*/
public function set_integration(Integration $integration): void {
public function set_integration(Integration $integration) {

$this->integration = $integration;
}

/**
* {@inheritdoc}
*/
public function get_integration(): Integration {
public function get_integration() {

return $this->integration;
}

/**
* {@inheritdoc}
*/
public function get_supported_features(): array {
public function get_supported_features() {

return $this->supported_features;
}

/**
* {@inheritdoc}
*/
public function register_hooks(): void {}
public function register_hooks() {}

/**
* {@inheritdoc}
*/
public function get_fields(): array {
public function get_fields() {

return [];
}

/**
* {@inheritdoc}
*/
public function get_explainer_lines(): array {
public function get_explainer_lines() {

return [
'will' => [],
Expand Down
26 changes: 13 additions & 13 deletions inc/integrations/host-providers/class-base-host-provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ abstract class Base_Host_Provider implements DNS_Provider_Interface {
* @since 2.0.0
* @return void
*/
public function init(): void {
public function init() {

if ($this->detect() && ! $this->is_enabled()) {
/*
Expand Down Expand Up @@ -197,7 +197,7 @@ public function disable() {
* @since 2.0.0
* @return void
*/
public function add_to_integration_list(): void {
public function add_to_integration_list() {

$slug = $this->get_id();

Expand Down Expand Up @@ -237,7 +237,7 @@ public function add_to_integration_list(): void {
* @since 2.0.0
* @return void
*/
public function alert_provider_detected(): void {
public function alert_provider_detected() {

if (WP_Ultimo()->is_loaded() === false) {
return;
Expand Down Expand Up @@ -270,7 +270,7 @@ public function alert_provider_detected(): void {
* @since 2.0.0
* @return void
*/
public function alert_provider_not_setup(): void {
public function alert_provider_not_setup() {

if (WP_Ultimo()->is_loaded() === false) {
return;
Expand Down Expand Up @@ -349,7 +349,7 @@ public function supports($feature) {
* @since 2.0.0
* @return void
*/
public function register_hooks(): void {
public function register_hooks() {
/*
* Hooks the event that is triggered when a new domain is added.
*/
Expand Down Expand Up @@ -494,7 +494,7 @@ public function get_all_constants() {
* @param array $constant_values Key => Value of the necessary constants.
* @return void
*/
public function setup_constants($constant_values): void {
public function setup_constants($constant_values) {
/*
* Important: This step is crucial, as it makes sure we clean up undesired constants.
* Removing this can allow insertion of arbitrary constants onto the wp-config.pp file
Expand Down Expand Up @@ -631,7 +631,7 @@ abstract public function on_remove_subdomain($subdomain, $site_id);
* @since 2.0.0
* @return void
*/
public function test_connection(): void {
public function test_connection() {

wp_send_json_success([]);
}
Expand Down Expand Up @@ -664,7 +664,7 @@ public function get_logo() {
* @since 2.3.0
* @return bool
*/
public function supports_dns_management(): bool {
public function supports_dns_management() {

return $this->supports('dns-management');
}
Expand Down Expand Up @@ -752,7 +752,7 @@ public function delete_dns_record(string $domain, string $record_id) {
*
* @return array Array of supported record types.
*/
public function get_supported_record_types(): array {
public function get_supported_record_types() {

return ['A', 'AAAA', 'CNAME', 'MX', 'TXT'];
}
Expand All @@ -768,7 +768,7 @@ public function get_supported_record_types(): array {
* @param string $domain The domain name.
* @return string|null Zone identifier or null if not found.
*/
public function get_zone_id(string $domain): ?string {
public function get_zone_id($domain) {

return null;
}
Expand All @@ -782,7 +782,7 @@ public function get_zone_id(string $domain): ?string {
*
* @return bool
*/
public function is_dns_enabled(): bool {
public function is_dns_enabled() {

if (! $this->supports_dns_management()) {
return false;
Expand All @@ -801,7 +801,7 @@ public function is_dns_enabled(): bool {
*
* @return bool
*/
public function enable_dns(): bool {
public function enable_dns() {

if (! $this->supports_dns_management()) {
return false;
Expand All @@ -820,7 +820,7 @@ public function enable_dns(): bool {
*
* @return bool
*/
public function disable_dns(): bool {
public function disable_dns() {

$dns_enabled = get_network_option(null, 'wu_dns_integrations_enabled', []);
$dns_enabled[ $this->get_id() ] = false;
Expand Down
Loading
Loading