|
12 | 12 | namespace Symfony\Bridge\Twig\Command;
|
13 | 13 |
|
14 | 14 | use Symfony\Component\Console\Command\Command;
|
| 15 | +use Symfony\Component\Console\Exception\InvalidArgumentException; |
| 16 | +use Symfony\Component\Console\Exception\RuntimeException; |
15 | 17 | use Symfony\Component\Console\Input\InputArgument;
|
16 | 18 | use Symfony\Component\Console\Input\InputInterface;
|
17 | 19 | use Symfony\Component\Console\Input\InputOption;
|
@@ -77,7 +79,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
|
77 | 79 |
|
78 | 80 | if (0 === count($filenames)) {
|
79 | 81 | if (0 !== ftell(STDIN)) {
|
80 |
| - throw new \RuntimeException('Please provide a filename or pipe template content to STDIN.'); |
| 82 | + throw new RuntimeException('Please provide a filename or pipe template content to STDIN.'); |
81 | 83 | }
|
82 | 84 |
|
83 | 85 | $template = '';
|
@@ -113,7 +115,7 @@ protected function findFiles($filename)
|
113 | 115 | return Finder::create()->files()->in($filename)->name('*.twig');
|
114 | 116 | }
|
115 | 117 |
|
116 |
| - throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); |
| 118 | + throw new RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); |
117 | 119 | }
|
118 | 120 |
|
119 | 121 | private function validate($template, $file)
|
@@ -142,7 +144,7 @@ private function display(InputInterface $input, OutputInterface $output, Symfony
|
142 | 144 | case 'json':
|
143 | 145 | return $this->displayJson($output, $files);
|
144 | 146 | default:
|
145 |
| - throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); |
| 147 | + throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); |
146 | 148 | }
|
147 | 149 | }
|
148 | 150 |
|
|
0 commit comments