Skip to content

Commit

Permalink
fix: common bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john committed Dec 16, 2024
1 parent 7271700 commit 1c8cccc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public static function create($level = '')
}

/**
* FIXME: misnamed method
*
* @return MonologLogger
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Service/ShopContent/BundlesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ public function getFullSyncContentLeft($offset, $limit, $langIso)

/**
* @param array<mixed> $bundles
* @param string $langIso
*
* @return void
*/
private function castBundles(&$bundles, $langIso)
private function castBundles(&$bundles)
{
foreach ($bundles as &$bundle) {
$bundle['id_product'] = (string) $bundle['id_product'];
Expand Down
8 changes: 4 additions & 4 deletions upgrade/Upgrade-4.0.0.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@
function upgrade_module_4_0_0()
{
if (!removeDuplicateEntryFromTypeSyncTable()) {
throw new Exception('Failed to remove duplicate entry from eventbus_type_sync.');
throw new \PrestaShopException('Failed to remove duplicate entry from eventbus_type_sync.');
}

// Ajouter la clé primaire
if (!addPrimaryKeyToTypeSyncTable()) {
throw new Exception('Failed to add primary key to eventbus_type_sync.');
throw new \PrestaShopException('Failed to add primary key to eventbus_type_sync.');
}

// Ajouter la colonne action
if (!addActionToIncrementalSyncTable()) {
throw new Exception("Failed to add 'action' column to eventbus_incremental_sync.");
throw new \PrestaShopException("Failed to add 'action' column to eventbus_incremental_sync.");
}

// Migrer les données
if (!migrateDeleteTableToIncremantalTable()) {
throw new Exception('Failed to migrate data to eventbus_incremental_sync.');
throw new \PrestaShopException('Failed to migrate data to eventbus_incremental_sync.');
}

return true;
Expand Down

0 comments on commit 1c8cccc

Please sign in to comment.