From aaaa307651516af0659693384d608f9538e552ca Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 4 Jun 2021 09:07:51 +0200 Subject: [PATCH] refactoring of makers --- .../{MakeEntityFactory.php => MakeFactory.php} | 16 ++++++++-------- .../Factory.tpl.php} | 0 2 files changed, 8 insertions(+), 8 deletions(-) rename core/Maker/{MakeEntityFactory.php => MakeFactory.php} (93%) rename core/Resources/maker/{entity/EntityFactory.tpl.php => factory/Factory.tpl.php} (100%) diff --git a/core/Maker/MakeEntityFactory.php b/core/Maker/MakeFactory.php similarity index 93% rename from core/Maker/MakeEntityFactory.php rename to core/Maker/MakeFactory.php index f51a44c..4ed7369 100644 --- a/core/Maker/MakeEntityFactory.php +++ b/core/Maker/MakeFactory.php @@ -13,11 +13,11 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use function Symfony\Component\String\u; -class MakeEntityFactory extends AbstractMaker +class MakeFactory extends AbstractMaker { public static function getCommandName(): string { - return 'make:entity-factory'; + return 'make:factory'; } public static function getCommandDescription(): string @@ -28,16 +28,16 @@ class MakeEntityFactory extends AbstractMaker public function configureCommand(Command $command, InputConfiguration $inputConf) { $command - ->addArgument( - 'entity-class', - InputArgument::OPTIONAL, - 'Define the entity (e.g. MyEntity)' - ) ->addArgument( 'factory-class', InputArgument::OPTIONAL, 'Choose a name for your factory (e.g. MyEntityFactory)' ) + ->addArgument( + 'entity-class', + InputArgument::OPTIONAL, + 'Define the entity (e.g. MyEntity)' + ) ->setHelp('') ; } @@ -62,7 +62,7 @@ class MakeEntityFactory extends AbstractMaker $factoryPath = $generator->generateController( $factoryDetails->getFullName(), - __DIR__.'/../Resources/maker/entity/EntityFactory.tpl.php', + __DIR__.'/../Resources/maker/factory/Factory.tpl.php', $options ); diff --git a/core/Resources/maker/entity/EntityFactory.tpl.php b/core/Resources/maker/factory/Factory.tpl.php similarity index 100% rename from core/Resources/maker/entity/EntityFactory.tpl.php rename to core/Resources/maker/factory/Factory.tpl.php