Skip to content

Commit

Permalink
Merge pull request #798 from WouterJ/patch-1
Browse files Browse the repository at this point in the history
Used build-in writeln and added some full stops
  • Loading branch information
jwage committed Feb 9, 2014
2 parents 68266e1 + 22ab444 commit db5fd69
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ protected function configure()
),
new InputOption(
'generate-annotations', null, InputOption::VALUE_OPTIONAL,
'Flag to define if generator should generate annotation metadata on documents.', false
'Flag to define if the generator should generate annotation metadata on documents.', false
),
new InputOption(
'generate-methods', null, InputOption::VALUE_OPTIONAL,
'Flag to define if generator should generate stub methods on documents.', true
'Flag to define if the generator should generate stub methods on documents.', true
),
new InputOption(
'regenerate-documents', null, InputOption::VALUE_OPTIONAL,
'Flag to define if generator should regenerate document if it exists.', false
'Flag to define if the generator should regenerate a document if it exists.', false
),
new InputOption(
'update-documents', null, InputOption::VALUE_OPTIONAL,
'Flag to define if generator should only update document if it exists.', true
'Flag to define if the generator should only update a document if it exists.', true
),
new InputOption(
'extend', null, InputOption::VALUE_OPTIONAL,
'Defines a base class to be extended by generated document classes.'
),
new InputOption(
'num-spaces', null, InputOption::VALUE_OPTIONAL,
'Defines the number of indentation spaces', 4
'Defines the number of indentation spaces.', 4
)
))
->setHelp(<<<EOT
Expand Down Expand Up @@ -142,18 +142,21 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
}

foreach ($metadatas as $metadata) {
$output->write(
sprintf('Processing document "<info>%s</info>"', $metadata->name) . PHP_EOL
$output->writeln(
sprintf('Processing document "<info>%s</info>".', $metadata->name)
);
}

// Generating Documents
$documentGenerator->generate($metadatas, $destPath);

// Outputting information message
$output->write(PHP_EOL . sprintf('Document classes generated to "<info>%s</INFO>"', $destPath) . PHP_EOL);
$output->writeln(array(
'',
sprintf('Document classes have been generated to "<info>%s</info>".', $destPath)
));
} else {
$output->write('No Metadata Classes to process.' . PHP_EOL);
$output->writeln('No Metadata Classes to process.');
}
}
}

0 comments on commit db5fd69

Please sign in to comment.