protected function ValidateCommand::configure in Twig Tweak 3.1.x
Same name and namespace in other branches
- 3.x src/Command/ValidateCommand.php \Drupal\twig_tweak\Command\ValidateCommand::configure()
Overrides LintCommand::configure
File
- src/
Command/ ValidateCommand.php, line 20
Class
- ValidateCommand
- Implements twig-tweak:lint console command.
Namespace
Drupal\twig_tweak\CommandCode
protected function configure() : void {
if (!\class_exists(Finder::class)) {
throw new \LogicException('To validate Twig templates you must install symfony/finder component.');
}
parent::configure();
$this
->setAliases([
'twig-validate',
]);
$this
->setHelp($this
->getHelp() . <<<'TEXT'
This command only validates Twig Syntax. For checking code style
consider using <info>friendsoftwig/twigcs</info> package.
TEXT
);
}