From 5989f741f6f8aedc766f41bb3dcbe24288bfad0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Zipfel?= Date: Fri, 13 Dec 2024 14:17:49 +0100 Subject: [PATCH] Refactor some wording --- config/admin/services.yml | 12 ++++++------ src/Controller/IsImagesliderController.php | 4 ++-- ...mageSliderFileters.php => ImageSliderFilters.php} | 2 +- ...eCrateTable.php => ActionDatabaseCreateTable.php} | 6 +++--- src/Installer/ImageSliderInstaller.php | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) rename src/Filter/{ImageSliderFileters.php => ImageSliderFilters.php} (90%) rename src/Installer/{ActionDatabaseCrateTable.php => ActionDatabaseCreateTable.php} (85%) diff --git a/config/admin/services.yml b/config/admin/services.yml index 570ebd7..56554bd 100644 --- a/config/admin/services.yml +++ b/config/admin/services.yml @@ -33,17 +33,17 @@ services: arguments: - '@oksydan.is_imageslider.module' - oksydan.is_imageslider.installer.action_databse_create_table: - class: 'Oksydan\IsImageslider\Installer\ActionDatabaseCrateTable' - parent: 'oksydan.is_imageslider.installer.abstract_action_databse' + oksydan.is_imageslider.installer.action_database_create_table: + class: 'Oksydan\IsImageslider\Installer\ActionDatabaseCreateTable' + parent: 'oksydan.is_imageslider.installer.abstract_action_database' public: true - oksydan.is_imageslider.installer.action_databse_drop_table: + oksydan.is_imageslider.installer.action_database_drop_table: class: 'Oksydan\IsImageslider\Installer\ActionDatabaseDropTable' - parent: 'oksydan.is_imageslider.installer.abstract_action_databse' + parent: 'oksydan.is_imageslider.installer.abstract_action_database' public: true - oksydan.is_imageslider.installer.abstract_action_databse: + oksydan.is_imageslider.installer.abstract_action_database: class: 'Oksydan\IsImageslider\Installer\ActionDatabaseAbstract' abstract: true arguments: diff --git a/src/Controller/IsImagesliderController.php b/src/Controller/IsImagesliderController.php index dd922d4..053ea3e 100644 --- a/src/Controller/IsImagesliderController.php +++ b/src/Controller/IsImagesliderController.php @@ -7,7 +7,7 @@ use Oksydan\IsImageslider\Cache\TemplateCache; use Oksydan\IsImageslider\Entity\ImageSlider; use Oksydan\IsImageslider\Exceptions\DateRangeNotValidException; -use Oksydan\IsImageslider\Filter\ImageSliderFileters; +use Oksydan\IsImageslider\Filter\ImageSliderFilters; use Oksydan\IsImageslider\Handler\FileEraser; use Oksydan\IsImageslider\Translations\TranslationDomains; use PrestaShop\PrestaShop\Core\Grid\Position\Exception\PositionDataException; @@ -41,7 +41,7 @@ public function __construct(FileEraser $fileEraser, $languages, TemplateCache $t $this->templateCache = $templateCache; } - public function index(ImageSliderFileters $filters): Response + public function index(ImageSliderFilters $filters): Response { $imageSliderGridFactory = $this->get('oksydan.is_imageslider.grid.image_slider_grid_factory'); $imageSliderGrid = $imageSliderGridFactory->getGrid($filters); diff --git a/src/Filter/ImageSliderFileters.php b/src/Filter/ImageSliderFilters.php similarity index 90% rename from src/Filter/ImageSliderFileters.php rename to src/Filter/ImageSliderFilters.php index 106335a..fc5f35f 100644 --- a/src/Filter/ImageSliderFileters.php +++ b/src/Filter/ImageSliderFilters.php @@ -9,7 +9,7 @@ /** * Class ProductFilter proves default filters for our products grid */ -final class ImageSliderFileters extends Filters +final class ImageSliderFilters extends Filters { /** * {@inheritdoc} diff --git a/src/Installer/ActionDatabaseCrateTable.php b/src/Installer/ActionDatabaseCreateTable.php similarity index 85% rename from src/Installer/ActionDatabaseCrateTable.php rename to src/Installer/ActionDatabaseCreateTable.php index cfb2466..6cfd585 100644 --- a/src/Installer/ActionDatabaseCrateTable.php +++ b/src/Installer/ActionDatabaseCreateTable.php @@ -4,7 +4,7 @@ namespace Oksydan\IsImageslider\Installer; -class ActionDatabaseCrateTable extends ActionDatabaseAbstract implements ActionDatabaseInterface +class ActionDatabaseCreateTable extends ActionDatabaseAbstract implements ActionDatabaseInterface { public const defaultEngine = 'InnoDb'; public const defaultCharset = 'UTF8'; @@ -47,9 +47,9 @@ private function buildSingleCreateQuery($tableName, $table): string $dbQuery .= ')'; - $dbQuery .= ' ENGINE = ' . (!empty($table['engine']) ? $table['engine'] : ActionDatabaseCrateTable::defaultEngine); + $dbQuery .= ' ENGINE = ' . (!empty($table['engine']) ? $table['engine'] : ActionDatabaseCreateTable::defaultEngine); - $dbQuery .= ' DEFAULT CHARACTER SET ' . (!empty($table['charset']) ? $table['charset'] : ActionDatabaseCrateTable::defaultCharset); + $dbQuery .= ' DEFAULT CHARACTER SET ' . (!empty($table['charset']) ? $table['charset'] : ActionDatabaseCreateTable::defaultCharset); return $dbQuery; } diff --git a/src/Installer/ImageSliderInstaller.php b/src/Installer/ImageSliderInstaller.php index 41395fc..31e8c42 100644 --- a/src/Installer/ImageSliderInstaller.php +++ b/src/Installer/ImageSliderInstaller.php @@ -53,7 +53,7 @@ public function createTables(): bool $container = $this->getContainer(); // THIS WAY INSTEAD OF SERVICE CALL COZ OF NOT AVAILABLE SERVICE DURING INSTALLATION - $createTableAction = new ActionDatabaseCrateTable( + $createTableAction = new ActionDatabaseCreateTable( $container->get('doctrine.dbal.default_connection'), $container->getParameter('database_prefix') ); @@ -94,7 +94,7 @@ public function dropTables(): bool { $databaseData = $this->databaseYaml->getParsedFileData(); $container = $this->getContainer(); - $dropTableAction = $container->get('oksydan.is_imageslider.installer.action_databse_drop_table'); + $dropTableAction = $container->get('oksydan.is_imageslider.installer.action_database_drop_table'); $dropTableAction ->setData($databaseData) ->buildQuery();