Skip to content

Commit 6441670

Browse files
committed
🎨 Fix PHPCS errors and alignment warnings in compat, gateway, and endpoint files
1 parent 4406555 commit 6441670

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

‎modules/ppcp-compat/services.php‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
return array(
1919

20-
'compat.ppec.mock-gateway' => static function ( $container ) {
20+
'compat.ppec.mock-gateway' => static function ( $container ) {
2121
$settings = $container->get( 'settings.settings-provider' );
2222
assert( $settings instanceof SettingsProvider );
2323

@@ -30,15 +30,15 @@
3030
return new PPEC\MockGateway( $title );
3131
},
3232

33-
'compat.ppec.billing-agreement-converter' => static function ( ContainerInterface $container ) {
33+
'compat.ppec.billing-agreement-converter' => static function ( ContainerInterface $container ) {
3434
return new PPEC\BillingAgreementTokenConverter(
3535
$container->get( 'api.endpoint.payment-method-tokens' ),
3636
$container->get( 'api.repository.customer' ),
3737
$container->get( 'woocommerce.logger.woocommerce' )
3838
);
3939
},
4040

41-
'compat.ppec.subscriptions-handler' => static function ( ContainerInterface $container ) {
41+
'compat.ppec.subscriptions-handler' => static function ( ContainerInterface $container ) {
4242
return new PPEC\SubscriptionsHandler(
4343
$container->get( 'wc-subscriptions.renewal-handler' ),
4444
$container->get( 'compat.ppec.mock-gateway' ),
@@ -47,7 +47,7 @@
4747
);
4848
},
4949

50-
'compat.plugin-script-names' => static function ( ContainerInterface $container ): array {
50+
'compat.plugin-script-names' => static function ( ContainerInterface $container ): array {
5151
return array(
5252
'ppcp-smart-button',
5353
'ppcp-oxxo',
@@ -61,7 +61,7 @@
6161
);
6262
},
6363

64-
'compat.plugin-script-file-names' => static function ( ContainerInterface $container ): array {
64+
'compat.plugin-script-file-names' => static function ( ContainerInterface $container ): array {
6565
return array(
6666
'button.js',
6767
'gateway-settings.js',
@@ -71,18 +71,18 @@
7171
);
7272
},
7373

74-
'compat.shiptastic.is_supported_plugin_version_active' => function (): bool {
74+
'compat.shiptastic.is_supported_plugin_version_active' => function (): bool {
7575
return function_exists( 'wc_stc_get_shipments' );
7676
},
7777

7878
'compat.wc_shipment_tracking.is_supported_plugin_version_active' => function (): bool {
7979
return class_exists( 'WC_Shipment_Tracking' );
8080
},
8181

82-
'compat.ywot.is_supported_plugin_version_active' => function (): bool {
82+
'compat.ywot.is_supported_plugin_version_active' => function (): bool {
8383
return function_exists( 'yith_ywot_init' );
8484
},
85-
'compat.dhl.is_supported_plugin_version_active' => function (): bool {
85+
'compat.dhl.is_supported_plugin_version_active' => function (): bool {
8686
return function_exists( 'PR_DHL' );
8787
},
8888
'compat.shipstation.is_supported_plugin_version_active' => function (): bool {
@@ -91,21 +91,21 @@
9191
'compat.wc_shipping_tax.is_supported_plugin_version_active' => function (): bool {
9292
return class_exists( 'WC_Connect_Loader' );
9393
},
94-
'compat.nyp.is_supported_plugin_version_active' => function (): bool {
94+
'compat.nyp.is_supported_plugin_version_active' => function (): bool {
9595
return function_exists( 'wc_nyp_init' );
9696
},
9797
'compat.wc_bookings.is_supported_plugin_version_active' => function (): bool {
9898
return class_exists( 'WC_Bookings' );
9999
},
100100

101-
'compat.asset_getter' => static function ( ContainerInterface $container ): AssetGetter {
101+
'compat.asset_getter' => static function ( ContainerInterface $container ): AssetGetter {
102102
$factory = $container->get( 'assets.asset_getter_factory' );
103103
assert( $factory instanceof AssetGetterFactory );
104104

105105
return $factory->for_module( 'ppcp-compat' );
106106
},
107107

108-
'compat.assets' => function ( ContainerInterface $container ): CompatAssets {
108+
'compat.assets' => function ( ContainerInterface $container ): CompatAssets {
109109
return new CompatAssets(
110110
$container->get( 'compat.asset_getter' ),
111111
$container->get( 'ppcp.asset-version' ),

‎modules/ppcp-wc-gateway/src/Endpoint/ReturnUrlEndpoint.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public function __construct(
6969
SessionHandler $session_handler,
7070
LoggerInterface $logger
7171
) {
72-
$this->gateway = $gateway;
73-
$this->order_endpoint = $order_endpoint;
74-
$this->session_handler = $session_handler;
75-
$this->logger = $logger;
72+
$this->gateway = $gateway;
73+
$this->order_endpoint = $order_endpoint;
74+
$this->session_handler = $session_handler;
75+
$this->logger = $logger;
7676
}
7777

7878
/**

‎modules/ppcp-wc-gateway/src/WCGatewayModule.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ static function () use ( $c ): void {
448448
if ( $pwc_product_status instanceof PWCProductStatus ) {
449449
$pwc_product_status->clear();
450450
}
451-
452451
}
453452
);
454453

0 commit comments

Comments
 (0)