Skip to content

Commit

Permalink
Fix --no-backup option in EntityGenerator (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbrouwers committed Jan 29, 2017
1 parent 958f91c commit dccbd6a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Console/GenerateEntitiesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class GenerateEntitiesCommand extends Command
{dest-path? : Path you want entities to be generated in }
{--filter=* : A string pattern used to match entities that should be processed.}
{--em= : Generate getter and setter for a specific entity manager. },
{--generate-annotations= : Flag to define if generator should generate annotation metadata on entities.}
{--generate-methods= : Flag to define if generator should generate stub methods on entities.}
{--regenerate-entities= : Flag to define if generator should regenerate entity if it exists.}
{--update-entities= : Flag to define if generator should only update entity if it exists.}
{--generate-annotations : Flag to define if generator should generate annotation metadata on entities.}
{--generate-methods : Flag to define if generator should generate stub methods on entities.}
{--regenerate-entities : Flag to define if generator should regenerate entity if it exists.}
{--update-entities : Flag to define if generator should only update entity if it exists.}
{--extend= : Defines a base class to be extended by generated entity classes.}
{--num-spaces= : Defines the number of indentation spaces.}
{--no-backup= : Flag to define if generator should avoid backuping existing entity file if it exists}';
{--num-spaces=4 : Defines the number of indentation spaces.}
{--no-backup : Flag to define if generator should avoid backuping existing entity file if it exists}';

/**
* The console command description.
Expand Down Expand Up @@ -73,9 +73,9 @@ public function fire(ManagerRegistry $registry)
$entityGenerator = new EntityGenerator();

$entityGenerator->setGenerateAnnotations($this->option('generate-annotations'));
$entityGenerator->setGenerateStubMethods($this->option('generate-methods') === null ? true : $this->option('generate-methods'));
$entityGenerator->setGenerateStubMethods($this->option('generate-methods'));
$entityGenerator->setRegenerateEntityIfExists($this->option('regenerate-entities'));
$entityGenerator->setUpdateEntityIfExists($this->option('update-entities') === null ? true : $this->option('update-entities'));
$entityGenerator->setUpdateEntityIfExists($this->option('update-entities'));
$entityGenerator->setNumSpaces($this->option('num-spaces'));
$entityGenerator->setBackupExisting(!$this->option('no-backup'));

Expand Down

0 comments on commit dccbd6a

Please sign in to comment.