namespace Symfony\Component\Yaml\Command;
use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
if (!$filename) {
if (!$stdin = $this->getStdin()) {
- throw new \RuntimeException('Please provide a filename or pipe file content to STDIN.');
+ throw new RuntimeException('Please provide a filename or pipe file content to STDIN.');
}
return $this->display($io, array($this->validate($stdin, $flags)));
}
if (!$this->isReadable($filename)) {
- throw new \RuntimeException(sprintf('File or directory "%s" is not readable.', $filename));
+ throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename));
}
$filesInfo = array();
case 'json':
return $this->displayJson($io, $files);
default:
- throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format));
+ throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format));
}
}