mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Fix phpcs errors
This commit is contained in:
parent
22e60d1448
commit
817a460666
3 changed files with 31 additions and 27 deletions
|
@ -43,7 +43,7 @@ class StatusReportModule implements ModuleInterface {
|
|||
public function run( ContainerInterface $container ): void {
|
||||
add_action(
|
||||
'woocommerce_system_status_report',
|
||||
function () use ($container) {
|
||||
function () use ( $container ) {
|
||||
|
||||
/* @var State $state The state. */
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
|
@ -106,22 +106,22 @@ class StatusReportModule implements ModuleInterface {
|
|||
* It returns the current onboarding status.
|
||||
*
|
||||
* @param Bearer $bearer The bearer.
|
||||
* @param State $state The state.
|
||||
* @param State $state The state.
|
||||
* @return string
|
||||
*/
|
||||
private function onboarded( $bearer, $state): string {
|
||||
private function onboarded( $bearer, $state ): string {
|
||||
try {
|
||||
$token = $bearer->bearer();
|
||||
} catch ( RuntimeException $exception ) {
|
||||
return esc_html__('No', 'woocommerce-paypal-payments');
|
||||
return esc_html__( 'No', 'woocommerce-paypal-payments' );
|
||||
}
|
||||
|
||||
$current_state = $state->current_state();
|
||||
if($token->is_valid() && $current_state === $state::STATE_ONBOARDED) {
|
||||
return esc_html__('Yes', 'woocommerce-paypal-payments');
|
||||
if ( $token->is_valid() && $current_state === $state::STATE_ONBOARDED ) {
|
||||
return esc_html__( 'Yes', 'woocommerce-paypal-payments' );
|
||||
}
|
||||
|
||||
return esc_html__('No', 'woocommerce-paypal-payments');
|
||||
return esc_html__( 'No', 'woocommerce-paypal-payments' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue