Skip to content

Commit

Permalink
FIX: Php CS Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
BadPixxel committed Nov 27, 2023
1 parent 096d8e9 commit 48300b4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions splash/src/Core/ExtraFieldsPhpUnitTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
52 changes: 26 additions & 26 deletions splash/src/Core/UnitConverterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions splash/src/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions splash/src/Objects/Product/MultiPricesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions splash/src/Objects/Product/PricesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 48300b4

Please sign in to comment.