From 1b6818f076c5e680c7f5489071005306c41e0524 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 29 Oct 2023 13:08:54 +0900 Subject: [PATCH] refactor: replace deprecated execute() with generateClass() --- system/Commands/Generators/CommandGenerator.php | 2 +- system/Commands/Generators/ConfigGenerator.php | 2 +- system/Commands/Generators/ControllerGenerator.php | 2 +- system/Commands/Generators/EntityGenerator.php | 2 +- system/Commands/Generators/FilterGenerator.php | 2 +- system/Commands/Generators/MigrationGenerator.php | 2 +- system/Commands/Generators/ModelGenerator.php | 2 +- system/Commands/Generators/SeederGenerator.php | 2 +- system/Commands/Generators/ValidationGenerator.php | 2 +- tests/_support/Commands/LanguageCommand.php | 2 +- tests/_support/Commands/Unsuffixable.php | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/system/Commands/Generators/CommandGenerator.php b/system/Commands/Generators/CommandGenerator.php index b844666a794e..3a47e68ac786 100644 --- a/system/Commands/Generators/CommandGenerator.php +++ b/system/Commands/Generators/CommandGenerator.php @@ -83,7 +83,7 @@ public function run(array $params) $this->template = 'command.tpl.php'; $this->classNameLang = 'CLI.generator.className.command'; - $this->execute($params); + $this->generateClass($params); } /** diff --git a/system/Commands/Generators/ConfigGenerator.php b/system/Commands/Generators/ConfigGenerator.php index a83a9671201d..217c00be46c0 100644 --- a/system/Commands/Generators/ConfigGenerator.php +++ b/system/Commands/Generators/ConfigGenerator.php @@ -79,7 +79,7 @@ public function run(array $params) $this->template = 'config.tpl.php'; $this->classNameLang = 'CLI.generator.className.config'; - $this->execute($params); + $this->generateClass($params); } /** diff --git a/system/Commands/Generators/ControllerGenerator.php b/system/Commands/Generators/ControllerGenerator.php index 2cf912b1c7ff..869bd5d15e82 100644 --- a/system/Commands/Generators/ControllerGenerator.php +++ b/system/Commands/Generators/ControllerGenerator.php @@ -85,7 +85,7 @@ public function run(array $params) $this->template = 'controller.tpl.php'; $this->classNameLang = 'CLI.generator.className.controller'; - $this->execute($params); + $this->generateClass($params); } /** diff --git a/system/Commands/Generators/EntityGenerator.php b/system/Commands/Generators/EntityGenerator.php index bd20daf59662..4cb44ad32d48 100644 --- a/system/Commands/Generators/EntityGenerator.php +++ b/system/Commands/Generators/EntityGenerator.php @@ -79,6 +79,6 @@ public function run(array $params) $this->template = 'entity.tpl.php'; $this->classNameLang = 'CLI.generator.className.entity'; - $this->execute($params); + $this->generateClass($params); } } diff --git a/system/Commands/Generators/FilterGenerator.php b/system/Commands/Generators/FilterGenerator.php index 620bee5a9ad4..ad1fa2da6908 100644 --- a/system/Commands/Generators/FilterGenerator.php +++ b/system/Commands/Generators/FilterGenerator.php @@ -79,6 +79,6 @@ public function run(array $params) $this->template = 'filter.tpl.php'; $this->classNameLang = 'CLI.generator.className.filter'; - $this->execute($params); + $this->generateClass($params); } } diff --git a/system/Commands/Generators/MigrationGenerator.php b/system/Commands/Generators/MigrationGenerator.php index 52f9e6e53535..de648d130c2c 100644 --- a/system/Commands/Generators/MigrationGenerator.php +++ b/system/Commands/Generators/MigrationGenerator.php @@ -90,7 +90,7 @@ public function run(array $params) } $this->classNameLang = 'CLI.generator.className.migration'; - $this->execute($params); + $this->generateClass($params); } /** diff --git a/system/Commands/Generators/ModelGenerator.php b/system/Commands/Generators/ModelGenerator.php index f4946a9441c9..6a817ef50eb5 100644 --- a/system/Commands/Generators/ModelGenerator.php +++ b/system/Commands/Generators/ModelGenerator.php @@ -83,7 +83,7 @@ public function run(array $params) $this->template = 'model.tpl.php'; $this->classNameLang = 'CLI.generator.className.model'; - $this->execute($params); + $this->generateClass($params); } /** diff --git a/system/Commands/Generators/SeederGenerator.php b/system/Commands/Generators/SeederGenerator.php index e60525ae0d57..b4a6d76ad4ce 100644 --- a/system/Commands/Generators/SeederGenerator.php +++ b/system/Commands/Generators/SeederGenerator.php @@ -79,6 +79,6 @@ public function run(array $params) $this->template = 'seeder.tpl.php'; $this->classNameLang = 'CLI.generator.className.seeder'; - $this->execute($params); + $this->generateClass($params); } } diff --git a/system/Commands/Generators/ValidationGenerator.php b/system/Commands/Generators/ValidationGenerator.php index 1b2efb8db18a..0a116f071682 100644 --- a/system/Commands/Generators/ValidationGenerator.php +++ b/system/Commands/Generators/ValidationGenerator.php @@ -79,6 +79,6 @@ public function run(array $params) $this->template = 'validation.tpl.php'; $this->classNameLang = 'CLI.generator.className.validation'; - $this->execute($params); + $this->generateClass($params); } } diff --git a/tests/_support/Commands/LanguageCommand.php b/tests/_support/Commands/LanguageCommand.php index 978099e5257f..172774c43477 100644 --- a/tests/_support/Commands/LanguageCommand.php +++ b/tests/_support/Commands/LanguageCommand.php @@ -39,7 +39,7 @@ public function run(array $params): void $sort = (isset($params['sort']) && $params['sort'] === 'off') ? false : true; $this->setSortImports($sort); - $this->execute($params); + $this->generateClass($params); } protected function prepare(string $class): string diff --git a/tests/_support/Commands/Unsuffixable.php b/tests/_support/Commands/Unsuffixable.php index 087dc558fdc0..96bfcb5d8205 100644 --- a/tests/_support/Commands/Unsuffixable.php +++ b/tests/_support/Commands/Unsuffixable.php @@ -72,6 +72,6 @@ public function run(array $params): void $this->template = 'command.tpl.php'; $this->setEnabledSuffixing(false); - $this->execute($params); + $this->generateClass($params); } }