mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
codesniffer cleanup
This commit is contained in:
parent
51465324a0
commit
4478ec87f2
13 changed files with 51 additions and 55 deletions
|
@ -57,9 +57,10 @@ class OrderTablePaymentStatusColumn
|
|||
|
||||
if ($this->isCaptured($wcOrder)) {
|
||||
$this->renderCompletedStatus();
|
||||
} else {
|
||||
$this->renderIncompletedStatus();
|
||||
return;
|
||||
}
|
||||
|
||||
$this->renderIncompletedStatus();
|
||||
}
|
||||
|
||||
private function renderForOrder(\WC_Order $order): bool
|
||||
|
|
|
@ -113,7 +113,7 @@ class WcGateway extends WcGatewayBase
|
|||
if ($this->authorizedPayments->lastStatus() === AuthorizedPaymentsProcessor::ALREADY_CAPTURED) {
|
||||
if ($wcOrder->get_status() === 'on-hold') {
|
||||
$wcOrder->add_order_note(
|
||||
__('Payment successfully captured.','woocommerce-paypal-gateway')
|
||||
__('Payment successfully captured.', 'woocommerce-paypal-gateway')
|
||||
);
|
||||
$wcOrder->set_status('processing');
|
||||
}
|
||||
|
@ -125,7 +125,8 @@ class WcGateway extends WcGatewayBase
|
|||
return false;
|
||||
}
|
||||
|
||||
private function renderAuthorizationMessageForStatus(string $status) {
|
||||
private function renderAuthorizationMessageForStatus(string $status)
|
||||
{
|
||||
|
||||
$messageMapping = [
|
||||
AuthorizedPaymentsProcessor::SUCCESSFUL => AuthorizeOrderActionNotice::SUCCESS,
|
||||
|
@ -137,7 +138,9 @@ class WcGateway extends WcGatewayBase
|
|||
$this->notice->displayMessage($displayMessage);
|
||||
}
|
||||
|
||||
public function generate_ppcp_onboarding_html($a, $b) {
|
||||
public function generate_ppcp_onboarding_html($a, $b)
|
||||
{
|
||||
|
||||
$this->onboardingRenderer->render();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@ class AuthorizedPaymentsProcessor
|
|||
return true;
|
||||
}
|
||||
|
||||
public function lastStatus() : string {
|
||||
public function lastStatus(): string
|
||||
{
|
||||
|
||||
return $this->lastStatus;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Inpsyde\PayPalCommerce\WcGateway\Settings;
|
||||
|
||||
|
||||
class FullyOnboardedSettings extends StartSettings implements SettingsFields
|
||||
{
|
||||
public function fields(): array
|
||||
|
@ -35,7 +35,7 @@ class FullyOnboardedSettings extends StartSettings implements SettingsFields
|
|||
'authorize' => __('Authorize', 'woocommerce-paypal-gateway'),
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,9 @@ class FullyOnboardedSettings extends StartSettings implements SettingsFields
|
|||
];
|
||||
}
|
||||
|
||||
private function creditCards() : array {
|
||||
private function creditCards(): array
|
||||
{
|
||||
|
||||
return [
|
||||
|
||||
'credit_card_settings' => [
|
||||
|
@ -184,4 +186,4 @@ class FullyOnboardedSettings extends StartSettings implements SettingsFields
|
|||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Inpsyde\PayPalCommerce\WcGateway\Settings;
|
||||
|
||||
|
||||
class ProgressiveSettings extends StartSettings implements SettingsFields
|
||||
{
|
||||
|
||||
|
@ -15,4 +15,4 @@ class ProgressiveSettings extends StartSettings implements SettingsFields
|
|||
];
|
||||
return $fields;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Inpsyde\PayPalCommerce\WcGateway\Settings;
|
||||
|
||||
|
||||
trait SettingsTrait
|
||||
{
|
||||
|
||||
private function defaultFields() : array
|
||||
private function defaultFields(): array
|
||||
{
|
||||
return [
|
||||
'enabled' => [
|
||||
|
@ -56,4 +56,4 @@ trait SettingsTrait
|
|||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Inpsyde\PayPalCommerce\WcGateway\Settings;
|
||||
|
||||
|
||||
class StartSettings implements SettingsFields
|
||||
{
|
||||
|
||||
use SettingsTrait;
|
||||
|
||||
public function fields(): array
|
||||
|
@ -27,4 +26,4 @@ class StartSettings implements SettingsFields
|
|||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue