Skip to content

Commit

Permalink
[TwigBundle] simplified code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 8, 2012
1 parent a11ec3e commit d694858
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
Expand Up @@ -88,13 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

foreach ($files as $file) {
try {
$twig->parse($twig->tokenize(file_get_contents($file)));
} catch (\Twig_Error $e) {
$e->setTemplateFile((string) $file);

throw $e;
}
$twig->parse($twig->tokenize(file_get_contents($file), (string) $file));
}

$output->writeln('<info>No syntax error detected.</info>');
Expand Down

0 comments on commit d694858

Please sign in to comment.