Skip to content

Commit

Permalink
Merge pull request #6 from sebastianbergmann/master
Browse files Browse the repository at this point in the history
Improve header for list of parser errors.
  • Loading branch information
manuelpichler committed Jan 25, 2012
2 parents 3b5ce37 + 94dd027 commit 41bdc44
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/php/PHP/Depend/TextUI/Command.php
Expand Up @@ -209,8 +209,16 @@ public function run()
$result = $this->_runner->run();

if ($this->_runner->hasParseErrors() === true) {
echo PHP_EOL, 'Following errors occured:', PHP_EOL;
foreach ($this->_runner->getParseErrors() as $error) {
$errors = $this->_runner->getParseErrors();

printf(
'%sThe following error%s occured:%s',
PHP_EOL,
count($errors) > 1 ? 's' : '',
PHP_EOL
);

foreach ($errors as $error) {
echo $error, PHP_EOL;
}
echo PHP_EOL;
Expand Down

0 comments on commit 41bdc44

Please sign in to comment.