|
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;
|
@@ -119,7 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
|
119 | 121 |
|
120 | 122 | if (0 === count($filenames)) {
|
121 | 123 | if (0 !== ftell(STDIN)) {
|
122 |
| - throw new \RuntimeException('Please provide a filename or pipe template content to STDIN.'); |
| 124 | + throw new RuntimeException('Please provide a filename or pipe template content to STDIN.'); |
123 | 125 | }
|
124 | 126 |
|
125 | 127 | $template = '';
|
@@ -155,7 +157,7 @@ protected function findFiles($filename)
|
155 | 157 | return Finder::create()->files()->in($filename)->name('*.twig');
|
156 | 158 | }
|
157 | 159 |
|
158 |
| - throw new \RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); |
| 160 | + throw new RuntimeException(sprintf('File or directory "%s" is not readable', $filename)); |
159 | 161 | }
|
160 | 162 |
|
161 | 163 | private function validate($template, $file)
|
@@ -184,7 +186,7 @@ private function display(InputInterface $input, OutputInterface $output, Symfony
|
184 | 186 | case 'json':
|
185 | 187 | return $this->displayJson($output, $files);
|
186 | 188 | default:
|
187 |
| - throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); |
| 189 | + throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $input->getOption('format'))); |
188 | 190 | }
|
189 | 191 | }
|
190 | 192 |
|
|
0 commit comments