Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
zalexki committed Jun 30, 2020
1 parent ad33c47 commit 65a6312
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
1 change: 0 additions & 1 deletion controllers/front/action.php
Expand Up @@ -18,7 +18,6 @@
* International Registered Trademark & Property of PrestaShop SA
*/

use PrestaShop\Module\BlockWishlist\WishList;
use PrestaShop\PrestaShop\Adapter\Image\ImageRetriever;
use PrestaShop\PrestaShop\Adapter\Product\PriceFormatter;
use PrestaShop\PrestaShop\Adapter\Product\ProductColorsRetriever;
Expand Down
51 changes: 27 additions & 24 deletions src/Controller/AdminAjaxPrestashopWishlistController.php
Expand Up @@ -89,6 +89,9 @@ private function handleForm($datas)
private function getWishlistConfigurationDatas()
{
$languages = \Language::getLanguages(true);
$wishlistNames = [];
$wishlistDefaultTitles = [];
$wishlistCreateNewButtonsLabel = [];

foreach ($languages as $lang) {
$wishlistNames[$lang['id_lang']] = \Configuration::get('blockwishlist_WishlistPageName', $lang['id_lang']);
Expand Down Expand Up @@ -129,28 +132,28 @@ public function getStatisticsAction(Request $request)
}

// this idea need some functional specification, it is not used ATM
public function forceRefreshCacheStatsAction(Request $request)
{
$cacheName = $request->request->get('cacheName');

$statsCalculator = new StatisticsCalculator($this->context);
switch ($cacheName) {
case 'year':
$results = $statsCalculator->computeYearStats();
break;
case 'month':
$results = $statsCalculator->computeMonthStats();
break;
case 'day':
$results = $statsCalculator->computeDayStats();
break;
default:
break;
}

return $this->json([
'success' => true,
'stats' => $results,
]);
}
// public function forceRefreshCacheStatsAction(Request $request)
// {
// $cacheName = $request->request->get('cacheName');

// $statsCalculator = new StatisticsCalculator($this->context);
// switch ($cacheName) {
// case 'year':
// $results = $statsCalculator->computeYearStats();
// break;
// case 'month':
// $results = $statsCalculator->computeMonthStats();
// break;
// case 'day':
// $results = $statsCalculator->computeDayStats();
// break;
// default:
// break;
// }

// return $this->json([
// 'success' => true,
// 'stats' => $results,
// ]);
// }
}
6 changes: 3 additions & 3 deletions views/js/admin/adminConfiguration.js
Expand Up @@ -18,7 +18,7 @@
*/

console.log('blockwishlist - adminConfiguration.js');
import TranslatableInput from "admin-dev/themes/new-theme/js/components/translatable-input";
// import TranslatableInput from "admin-dev/themes/new-theme/js/components/translatable-input";

// enable togging of different locales
new TranslatableInput();
// // enable togging of different locales
// new TranslatableInput();

0 comments on commit 65a6312

Please sign in to comment.