From 48300b4a331e2929ebec1190c7a4461f39382fe4 Mon Sep 17 00:00:00 2001 From: BadPixxel Date: Mon, 27 Nov 2023 11:44:09 +0100 Subject: [PATCH] FIX: Php CS Fixer --- splash/src/Core/ExtraFieldsPhpUnitTrait.php | 4 +- splash/src/Core/UnitConverterTrait.php | 52 +++++++++---------- splash/src/Local.php | 4 +- .../src/Objects/Product/MultiPricesTrait.php | 4 +- splash/src/Objects/Product/PricesTrait.php | 4 +- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/splash/src/Core/ExtraFieldsPhpUnitTrait.php b/splash/src/Core/ExtraFieldsPhpUnitTrait.php index e9c3eb9..8b14f32 100644 --- a/splash/src/Core/ExtraFieldsPhpUnitTrait.php +++ b/splash/src/Core/ExtraFieldsPhpUnitTrait.php @@ -81,8 +81,8 @@ public static function configurePhpUnitExtraFields(string $elementType, bool $vi '0', ($visible ? '0':'1') ); - //====================================================================// - // ExtraField Not Found = Create + //====================================================================// + // ExtraField Not Found = Create } else { $extraFields->addExtraField( $extraFieldName, diff --git a/splash/src/Core/UnitConverterTrait.php b/splash/src/Core/UnitConverterTrait.php index 1bd5388..e9a7433 100644 --- a/splash/src/Core/UnitConverterTrait.php +++ b/splash/src/Core/UnitConverterTrait.php @@ -121,23 +121,23 @@ public function normalizeWeight(?float $weight): ArrayObject $result->weight = Converter::convertWeight((float) $weight, $splFactor); // Force Variant Weight Unit to Parent Unit $result->weight_units = $this->baseProduct->weight_units; - //====================================================================// - // Weight - Tonne + //====================================================================// + // Weight - Tonne } elseif ($weight >= 1e3) { $result->weight = Converter::convertWeight((float) $weight, Converter::MASS_TONNE); $result->weight_units = self::getDolUnitId("weight", "3"); - //====================================================================// - // Weight - KiloGram + //====================================================================// + // Weight - KiloGram } elseif ($weight >= 1) { $result->weight = Converter::convertWeight((float) $weight, Converter::MASS_KILOGRAM); $result->weight_units = self::getDolUnitId("weight", "0"); - //====================================================================// - // Weight - Gram + //====================================================================// + // Weight - Gram } elseif ($weight >= 1e-3) { $result->weight = Converter::convertWeight((float) $weight, Converter::MASS_GRAM); $result->weight_units = self::getDolUnitId("weight", "-3"); - //====================================================================// - // Weight - MilliGram + //====================================================================// + // Weight - MilliGram } elseif ($weight >= 1e-6) { $result->weight = Converter::convertWeight((float) $weight, Converter::MASS_MILLIGRAM); $result->weight_units = self::getDolUnitId("weight", "-6"); @@ -181,18 +181,18 @@ public static function normalizeLength(?float $length): ArrayObject if ($length >= 1) { $result->length = Converter::convertLength((float) $length, Converter::LENGTH_M); $result->length_units = self::getDolUnitId("size", "0"); - //====================================================================// - // Length - DecaMeter + //====================================================================// + // Length - DecaMeter } elseif ($length >= 1e-1) { $result->length = Converter::convertLength((float) $length, Converter::LENGTH_DM); $result->length_units = self::getDolUnitId("size", "-1"); - //====================================================================// - // Length - CentiMeter + //====================================================================// + // Length - CentiMeter } elseif ($length >= 1e-2) { $result->length = Converter::convertLength((float) $length, Converter::LENGTH_CM); $result->length_units = self::getDolUnitId("size", "-2"); - //====================================================================// - // Length - MilliMeter + //====================================================================// + // Length - MilliMeter } elseif ($length >= 1e-3) { $result->length = Converter::convertLength((float) $length, Converter::LENGTH_MM); $result->length_units = self::getDolUnitId("size", "-3"); @@ -236,18 +236,18 @@ public static function normalizeSurface(?float $surface): ArrayObject if ($surface >= 1) { $result->surface = Converter::convertSurface((float) $surface, Converter::AREA_M2); $result->surface_units = self::getDolUnitId("surface", "0"); - //====================================================================// - // Surface - DecaMeter 2 + //====================================================================// + // Surface - DecaMeter 2 } elseif ($surface >= 1e-2) { $result->surface = Converter::convertSurface((float) $surface, Converter::AREA_DM2); $result->surface_units = self::getDolUnitId("surface", "-2"); - //====================================================================// - // Surface - CentiMeter 2 + //====================================================================// + // Surface - CentiMeter 2 } elseif ($surface >= 1e-4) { $result->surface = Converter::convertSurface((float) $surface, Converter::AREA_CM2); $result->surface_units = self::getDolUnitId("surface", "-4"); - //====================================================================// - // Surface - MilliMeter 2 + //====================================================================// + // Surface - MilliMeter 2 } elseif ($surface >= 1e-6) { $result->surface = Converter::convertSurface((float) $surface, Converter::AREA_MM2); $result->surface_units = self::getDolUnitId("surface", "-6"); @@ -291,18 +291,18 @@ public static function normalizeVolume(?float $volume): ArrayObject if ($volume >= 1) { $result->volume = Converter::convertVolume((float) $volume, Converter::VOLUME_M3); $result->volume_units = self::getDolUnitId("volume", "0"); - //====================================================================// - // Volume - DecaMeter 3 + //====================================================================// + // Volume - DecaMeter 3 } elseif ($volume >= 1e-3) { $result->volume = Converter::convertVolume((float) $volume, Converter::VOLUME_DM3); $result->volume_units = self::getDolUnitId("volume", "-3"); - //====================================================================// - // Volume - CentiMeter 3 + //====================================================================// + // Volume - CentiMeter 3 } elseif ($volume >= 1e-6) { $result->volume = Converter::convertVolume((float) $volume, Converter::VOLUME_CM3); $result->volume_units = self::getDolUnitId("volume", "-6"); - //====================================================================// - // Volume - MilliMeter 3 + //====================================================================// + // Volume - MilliMeter 3 } elseif ($volume >= 1e-9) { $result->volume = Converter::convertVolume((float) $volume, Converter::VOLUME_MM3); $result->volume_units = self::getDolUnitId("volume", "-9"); diff --git a/splash/src/Local.php b/splash/src/Local.php index ed4f8ef..7d38453 100644 --- a/splash/src/Local.php +++ b/splash/src/Local.php @@ -99,8 +99,8 @@ public function parameters(): array // Override Module Parameters with Local User Selected Lang if (self::getParameter("SPLASH_LANG")) { $parameters["DefaultLanguage"] = self::getParameter("SPLASH_LANG"); - //====================================================================// - // Override Module Parameters with Local Default System Lang + //====================================================================// + // Override Module Parameters with Local Default System Lang } elseif (($langs) && $langs->getDefaultLang()) { $parameters["DefaultLanguage"] = $langs->getDefaultLang(); } diff --git a/splash/src/Objects/Product/MultiPricesTrait.php b/splash/src/Objects/Product/MultiPricesTrait.php index 953ad82..fc030ae 100644 --- a/splash/src/Objects/Product/MultiPricesTrait.php +++ b/splash/src/Objects/Product/MultiPricesTrait.php @@ -167,8 +167,8 @@ protected function setMultiPricesFields(string $fieldName, ?array $fieldData): v if ($fieldData["base"]) { $price = $fieldData["ttc"]; $priceBase = "TTC"; - //====================================================================// - // Update Based on HT Price + //====================================================================// + // Update Based on HT Price } else { $price = $fieldData["ht"]; $priceBase = "HT"; diff --git a/splash/src/Objects/Product/PricesTrait.php b/splash/src/Objects/Product/PricesTrait.php index 28c3a3b..3637db2 100644 --- a/splash/src/Objects/Product/PricesTrait.php +++ b/splash/src/Objects/Product/PricesTrait.php @@ -247,8 +247,8 @@ private function setProductPrice(array $newPrice): bool if ($newPrice["base"]) { $price = $newPrice["ttc"]; $priceBase = "TTC"; - //====================================================================// - // Update Based on HT Price + //====================================================================// + // Update Based on HT Price } else { $price = $newPrice["ht"]; $priceBase = "HT";