From ff18ec3e1beee2d4a0c0b68d56d59d827d0db4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Nov 2024 12:59:56 +0000 Subject: [PATCH] Fix coding style --- src/Contract/WpFilterServiceInterface.php | 2 +- src/Hooks/CartFeesHooks.php | 5 ++++- src/Hooks/Concern/UsesPdkRequestConverter.php | 1 - src/Integration/AbstractBlocksIntegration.php | 6 ++++-- src/Migration/AbstractUpgradeMigration.php | 12 +++++++++--- src/Migration/Migration2_0_0.php | 5 +++-- src/Migration/Migration2_4_0_beta_4.php | 1 - src/Migration/Migration4_0_0.php | 1 - src/Migration/Migration4_1_0.php | 1 - src/Migration/Migration4_2_1.php | 1 - src/Migration/Migration4_4_1.php | 1 - src/Pdk/WcPdkBootstrapper.php | 6 ++++-- 12 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/Contract/WpFilterServiceInterface.php b/src/Contract/WpFilterServiceInterface.php index d13d8f96f..0f3484c12 100644 --- a/src/Contract/WpFilterServiceInterface.php +++ b/src/Contract/WpFilterServiceInterface.php @@ -15,4 +15,4 @@ interface WpFilterServiceInterface * @return T */ public function apply(string $name, $value, ...$args); -} \ No newline at end of file +} diff --git a/src/Hooks/CartFeesHooks.php b/src/Hooks/CartFeesHooks.php index 005198355..cedcb897f 100644 --- a/src/Hooks/CartFeesHooks.php +++ b/src/Hooks/CartFeesHooks.php @@ -20,7 +20,10 @@ final class CartFeesHooks implements WordPressHooksInterface /** @var WcTaxService */ private $taxService; - public function __construct(WcTaxService $taxService) { $this->taxService = $taxService; } + public function __construct(WcTaxService $taxService) + { + $this->taxService = $taxService; + } public function apply(): void { diff --git a/src/Hooks/Concern/UsesPdkRequestConverter.php b/src/Hooks/Concern/UsesPdkRequestConverter.php index 3d41c5d8b..de8e6b892 100644 --- a/src/Hooks/Concern/UsesPdkRequestConverter.php +++ b/src/Hooks/Concern/UsesPdkRequestConverter.php @@ -34,4 +34,3 @@ protected function convertRequest(WP_REST_Request $wpRestRequest): Request return $request; } } - diff --git a/src/Integration/AbstractBlocksIntegration.php b/src/Integration/AbstractBlocksIntegration.php index 6123967ce..be9aef15b 100644 --- a/src/Integration/AbstractBlocksIntegration.php +++ b/src/Integration/AbstractBlocksIntegration.php @@ -63,10 +63,12 @@ final public function get_script_handles(): array /** * @return void */ - public function initialize(): void {} + public function initialize(): void + { + } protected function getScriptData(): array { return []; } -} \ No newline at end of file +} diff --git a/src/Migration/AbstractUpgradeMigration.php b/src/Migration/AbstractUpgradeMigration.php index 323dfbec5..64ca3ef7c 100644 --- a/src/Migration/AbstractUpgradeMigration.php +++ b/src/Migration/AbstractUpgradeMigration.php @@ -31,12 +31,16 @@ protected function getSettings(string $settingName): array /** * Import any dependencies you might need using this function */ - protected function import(): void { } + protected function import(): void + { + } /** * Put the migration logic in this function. */ - protected function migrate(): void { } + protected function migrate(): void + { + } /** * @param array $map @@ -125,5 +129,7 @@ protected function saveSettings(string $name, array $settings): void /** * */ - protected function setOptionSettingsMap(): void { } + protected function setOptionSettingsMap(): void + { + } } diff --git a/src/Migration/Migration2_0_0.php b/src/Migration/Migration2_0_0.php index 5d68ca27e..c7424f059 100644 --- a/src/Migration/Migration2_0_0.php +++ b/src/Migration/Migration2_0_0.php @@ -11,7 +11,9 @@ */ final class Migration2_0_0 implements MigrationInterface { - public function down(): void {} + public function down(): void + { + } public function getVersion(): string { @@ -78,4 +80,3 @@ public function up(): void update_option('woocommerce_myparcel_export_defaults_settings', $defaultSettings); } } - diff --git a/src/Migration/Migration2_4_0_beta_4.php b/src/Migration/Migration2_4_0_beta_4.php index fa5664d96..44a6cf9c9 100644 --- a/src/Migration/Migration2_4_0_beta_4.php +++ b/src/Migration/Migration2_4_0_beta_4.php @@ -31,4 +31,3 @@ public function up(): void } } } - diff --git a/src/Migration/Migration4_0_0.php b/src/Migration/Migration4_0_0.php index 3496079a7..f867e016c 100644 --- a/src/Migration/Migration4_0_0.php +++ b/src/Migration/Migration4_0_0.php @@ -237,4 +237,3 @@ private function migrateGeneralSettings(): void ); } } - diff --git a/src/Migration/Migration4_1_0.php b/src/Migration/Migration4_1_0.php index 0fc60d869..7ad779605 100644 --- a/src/Migration/Migration4_1_0.php +++ b/src/Migration/Migration4_1_0.php @@ -242,4 +242,3 @@ private function roundUpToMatch(int $target, array $possibleValues): int return $possibleValues[$match] ?? $possibleValues[0]; } } - diff --git a/src/Migration/Migration4_2_1.php b/src/Migration/Migration4_2_1.php index b4d5f8733..1f7971cf4 100644 --- a/src/Migration/Migration4_2_1.php +++ b/src/Migration/Migration4_2_1.php @@ -62,4 +62,3 @@ protected function setOptionSettingsMap(): void ]; } } - diff --git a/src/Migration/Migration4_4_1.php b/src/Migration/Migration4_4_1.php index 87726a020..036ee04b5 100644 --- a/src/Migration/Migration4_4_1.php +++ b/src/Migration/Migration4_4_1.php @@ -78,4 +78,3 @@ private function migrateGeneralSettings(): void unset($this->newCheckoutSettings['show_delivery_day']); } } - diff --git a/src/Pdk/WcPdkBootstrapper.php b/src/Pdk/WcPdkBootstrapper.php index 12d5cbadc..558be9cfa 100644 --- a/src/Pdk/WcPdkBootstrapper.php +++ b/src/Pdk/WcPdkBootstrapper.php @@ -204,8 +204,10 @@ protected function getAdditionalConfig( 'disabledSettings' => factory(function () { $disabledSettings = []; - if (Pdk::get(WooCommerceService::class) - ->isUsingBlocksCheckout()) { + if ( + Pdk::get(WooCommerceService::class) + ->isUsingBlocksCheckout() + ) { $disabledSettings[CheckoutSettings::ID][] = CheckoutSettings::DELIVERY_OPTIONS_POSITION; }