Fix the coding styles

This commit is contained in:
Narek Zakarian 2023-10-16 16:09:36 +04:00
parent 7ea6b37a45
commit 8c8cbc6153
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
2 changed files with 6 additions and 15 deletions

View file

@ -14,7 +14,7 @@ use WooCommerce\PayPalCommerce\Compat\Assets\CompatAssets;
return array(
'compat.ppec.mock-gateway' => static function( $container ) {
'compat.ppec.mock-gateway' => static function( $container ) {
$settings = $container->get( 'wcgateway.settings' );
$title = $settings->has( 'title' ) ? $settings->get( 'title' ) : __( 'PayPal', 'woocommerce-paypal-payments' );
$title = sprintf(
@ -26,20 +26,20 @@ return array(
return new PPEC\MockGateway( $title );
},
'compat.ppec.subscriptions-handler' => static function ( ContainerInterface $container ) {
'compat.ppec.subscriptions-handler' => static function ( ContainerInterface $container ) {
$ppcp_renewal_handler = $container->get( 'subscription.renewal-handler' );
$gateway = $container->get( 'compat.ppec.mock-gateway' );
return new PPEC\SubscriptionsHandler( $ppcp_renewal_handler, $gateway );
},
'compat.ppec.settings_importer' => static function( ContainerInterface $container ) : PPEC\SettingsImporter {
'compat.ppec.settings_importer' => static function( ContainerInterface $container ) : PPEC\SettingsImporter {
$settings = $container->get( 'wcgateway.settings' );
return new PPEC\SettingsImporter( $settings );
},
'compat.plugin-script-names' => static function( ContainerInterface $container ) : array {
'compat.plugin-script-names' => static function( ContainerInterface $container ) : array {
return array(
'ppcp-smart-button',
'ppcp-oxxo',
@ -54,7 +54,7 @@ return array(
);
},
'compat.module.url' => static function ( ContainerInterface $container ): string {
'compat.module.url' => static function ( ContainerInterface $container ): string {
/**
* The path cannot be false.
*
@ -66,7 +66,7 @@ return array(
);
},
'compat.assets' => function( ContainerInterface $container ) : CompatAssets {
'compat.assets' => function( ContainerInterface $container ) : CompatAssets {
return new CompatAssets(
$container->get( 'compat.module.url' ),
$container->get( 'ppcp.asset-version' ),

View file

@ -9,22 +9,13 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Compat;
use Vendidero\Germanized\Shipments\ShipmentItem;
use WooCommerce\PayPalCommerce\OrderTracking\Shipment\ShipmentFactoryInterface;
use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider;
use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface;
use Exception;
use WooCommerce\PayPalCommerce\Vendor\Interop\Container\ServiceProviderInterface;
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Vendidero\Germanized\Shipments\Shipment;
use WC_Order;
use WooCommerce\PayPalCommerce\Compat\Assets\CompatAssets;
use WooCommerce\PayPalCommerce\OrderTracking\Endpoint\OrderTrackingEndpoint;
use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException;
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
use WP_REST_Request;
use WP_REST_Response;
/**
* Class CompatModule