@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function translate($value, array $payload) |
| 25 | 25 | { |
| 26 | 26 | if (is_array($value[0][static::KEY_DATA]) && array_key_exists(static::KEY_AMOUNT, $value[0][static::KEY_DATA])) { |
| 27 | - $value[0][static::KEY_DATA] = (int)$value[0][static::KEY_DATA][static::KEY_AMOUNT]; |
|
| 27 | + $value[0][static::KEY_DATA] = (int) $value[0][static::KEY_DATA][static::KEY_AMOUNT]; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | return $value; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | foreach ($priceInfo[static::KEY_DATA] as $price) { |
| 65 | 65 | if ($price[static::KEY_CURRENCY] === $currency) { |
| 66 | 66 | $result[] = [ |
| 67 | - static::KEY_PRICE => (int)((float)$price[static::KEY_AMOUNT]) * 100, |
|
| 67 | + static::KEY_PRICE => (int) ((float) $price[static::KEY_AMOUNT]) * 100, |
|
| 68 | 68 | static::KEY_PRICE_TYPE => $type, |
| 69 | 69 | static::KEY_CURRENCY => $price[static::KEY_CURRENCY], |
| 70 | 70 | static::KEY_STORE => $store, |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $value[static::KEY_ABSTRACT_SKU] = $payload[static::KEY_PARENT]; |
| 38 | 38 | $value[static::ABSTRACT_IDENTIFIER] = false; |
| 39 | 39 | |
| 40 | - return $value; |
|
| 40 | + return $value; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -47,6 +47,6 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | protected function createAbstractSKU(string $sku): string |
| 49 | 49 | { |
| 50 | - return $sku . '_abstract'; |
|
| 50 | + return $sku.'_abstract'; |
|
| 51 | 51 | } |
| 52 | 52 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | foreach ($priceInfo[static::KEY_DATA] as $price) { |
| 68 | 68 | foreach ($this->getStores() as $store) { |
| 69 | 69 | $result[] = [ |
| 70 | - static::KEY_PRICE => (int)((float)$price[static::KEY_AMOUNT]) * 100, |
|
| 70 | + static::KEY_PRICE => (int) ((float) $price[static::KEY_AMOUNT]) * 100, |
|
| 71 | 71 | static::KEY_PRICE_TYPE => static::DEFAULT_PRICE_TYPE, |
| 72 | 72 | static::KEY_CURRENCY => $price[static::KEY_CURRENCY], |
| 73 | 73 | static::KEY_STORE => $store, |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | foreach ($priceInfo[static::KEY_DATA] as $price) { |
| 88 | 88 | if ($price[static::KEY_CURRENCY] === $currency) { |
| 89 | 89 | $result[] = [ |
| 90 | - static::KEY_PRICE => (int)((float)$price[static::KEY_AMOUNT]) * 100, |
|
| 90 | + static::KEY_PRICE => (int) ((float) $price[static::KEY_AMOUNT]) * 100, |
|
| 91 | 91 | static::KEY_PRICE_TYPE => $type, |
| 92 | 92 | static::KEY_CURRENCY => $price[static::KEY_CURRENCY], |
| 93 | 93 | static::KEY_STORE => $store, |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | public function generate(string $name, int $idLocale, string $identifier): string |
| 43 | 43 | { |
| 44 | 44 | $abstractProductUrl = $this->utilTextService->generateSlug($name); |
| 45 | - $abstractProductUrl = '/' . substr($this->getLocaleNameById($idLocale), 0, 2) . '/' . $abstractProductUrl . '-' . md5($identifier); |
|
| 45 | + $abstractProductUrl = '/'.substr($this->getLocaleNameById($idLocale), 0, 2).'/'.$abstractProductUrl.'-'.md5($identifier); |
|
| 46 | 46 | $this->cleanupRedirectUrls($abstractProductUrl); |
| 47 | 47 | |
| 48 | 48 | return $abstractProductUrl; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | return [ |
| 44 | 44 | 'values.*' => 'MeasureUnitToInt', |
| 45 | - 'values.collection.data' => function ($value) { |
|
| 45 | + 'values.collection.data' => function($value) { |
|
| 46 | 46 | if (is_array($value)) { |
| 47 | 47 | return reset($value); |
| 48 | 48 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | ], |
| 51 | 51 | ], |
| 52 | 52 | 'values.*' => 'MeasureUnitToInt', |
| 53 | - 'values.collection.data' => function ($value) { |
|
| 53 | + 'values.collection.data' => function($value) { |
|
| 54 | 54 | if (is_array($value)) { |
| 55 | 55 | return reset($value); |
| 56 | 56 | } |
@@ -22,13 +22,13 @@ |
||
| 22 | 22 | 'parent_category_key' => 'parent', |
| 23 | 23 | 'localizedAttributes' => 'labels', |
| 24 | 24 | 'locales' => 'labels', |
| 25 | - 'is_root' => function (array $item) { |
|
| 25 | + 'is_root' => function(array $item) { |
|
| 26 | 26 | return empty($item['parent']); |
| 27 | 27 | }, |
| 28 | - 'is_main' => function (array $item) { |
|
| 28 | + 'is_main' => function(array $item) { |
|
| 29 | 29 | return true; |
| 30 | 30 | }, |
| 31 | - 'fk_category_template' => function (array $item) { |
|
| 31 | + 'fk_category_template' => function(array $item) { |
|
| 32 | 32 | return null; |
| 33 | 33 | }, |
| 34 | 34 | ]; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public function getMap(): array |
| 19 | 19 | { |
| 20 | 20 | return [ |
| 21 | - 'options' => function (array $value) { |
|
| 21 | + 'options' => function(array $value) { |
|
| 22 | 22 | return [ |
| 23 | 23 | 'code' => $value['code'], |
| 24 | 24 | 'type' => $value['type'], |