@@ -770,20 +770,20 @@ |
||
770 | 770 | |
771 | 771 | return [ |
772 | 772 | // All fields provided, will only match websites w/ exact matches |
773 | - [$websiteFilters, $clientId, $catalogId, $storeId, [0], [0,1,2]], |
|
774 | - [$websiteFilters, $altClientId, $catalogId, $storeId, [0], [0,3]], |
|
775 | - [$websiteFilters, $clientId, $altCatalogId, $storeId, [0], [0,3]], |
|
776 | - [$websiteFilters, $clientId, $catalogId, $altStoreId, [0], [0,3]], |
|
773 | + [$websiteFilters, $clientId, $catalogId, $storeId, [0], [0, 1, 2]], |
|
774 | + [$websiteFilters, $altClientId, $catalogId, $storeId, [0], [0, 3]], |
|
775 | + [$websiteFilters, $clientId, $altCatalogId, $storeId, [0], [0, 3]], |
|
776 | + [$websiteFilters, $clientId, $catalogId, $altStoreId, [0], [0, 3]], |
|
777 | 777 | // Any value excluded will act as wildcard, matching anything, |
778 | 778 | // each of these cases will match at least on of the website with |
779 | 779 | // non-default configured stores |
780 | - [$websiteFilters, '', $catalogId, $storeId, [0], [0,1,2,3]], |
|
781 | - [$websiteFilters, $clientId, '', $storeId, [0], [0,1,2,3]], |
|
782 | - [$websiteFilters, $clientId, $catalogId, '', [0], [0,1,2,3]], |
|
780 | + [$websiteFilters, '', $catalogId, $storeId, [0], [0, 1, 2, 3]], |
|
781 | + [$websiteFilters, $clientId, '', $storeId, [0], [0, 1, 2, 3]], |
|
782 | + [$websiteFilters, $clientId, $catalogId, '', [0], [0, 1, 2, 3]], |
|
783 | 783 | // All values empty will match everything |
784 | - [$websiteFilters, '', '', '', [0], [0,1,2,3]], |
|
784 | + [$websiteFilters, '', '', '', [0], [0, 1, 2, 3]], |
|
785 | 785 | // Nothing matches, expect existing values to remain the same |
786 | - [$websiteFilters, $altClientId, $altCatalogId, $altStoreId, [0,5,7], [0,5,7]], |
|
786 | + [$websiteFilters, $altClientId, $altCatalogId, $altStoreId, [0, 5, 7], [0, 5, 7]], |
|
787 | 787 | ]; |
788 | 788 | } |
789 | 789 |
@@ -370,8 +370,8 @@ discard block |
||
370 | 370 | */ |
371 | 371 | public function mapPattern(array $keyMap, $pattern) |
372 | 372 | { |
373 | - return array_reduce(array_keys($keyMap), function ($result, $key) use ($keyMap, $pattern) { |
|
374 | - $result = (trim($result) === '')? $pattern : $result; |
|
373 | + return array_reduce(array_keys($keyMap), function($result, $key) use ($keyMap, $pattern) { |
|
374 | + $result = (trim($result) === '') ? $pattern : $result; |
|
375 | 375 | return str_replace(sprintf('{%s}', $key), $keyMap[$key], $result); |
376 | 376 | }); |
377 | 377 | } |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | { |
616 | 616 | // Function to create hash of elements of a site filter that we care |
617 | 617 | // about being unique. |
618 | - $hashSite = function ($site) { |
|
618 | + $hashSite = function($site) { |
|
619 | 619 | return sprintf( |
620 | 620 | '%s|%s|%s|%s', |
621 | 621 | $site['catalog_id'], $site['client_id'], $site['store_id'], $site['lang_code'] |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | */ |
703 | 703 | public function denormalizeSku($itemId, $catalogId) |
704 | 704 | { |
705 | - return (!empty($itemId) && strpos($itemId, $catalogId . '-') === 0)? |
|
705 | + return (!empty($itemId) && strpos($itemId, $catalogId . '-') === 0) ? |
|
706 | 706 | str_replace($catalogId . '-', '', $itemId) : $itemId; |
707 | 707 | } |
708 | 708 | |
@@ -780,7 +780,7 @@ discard block |
||
780 | 780 | * @param mixed |
781 | 781 | * @return mixed |
782 | 782 | */ |
783 | - protected function reregister($key, $value=null) |
|
783 | + protected function reregister($key, $value = null) |
|
784 | 784 | { |
785 | 785 | $old = Mage::registry($key); |
786 | 786 | Mage::unregister($key); |