final class ValidateCommand in Twig Tweak 3.1.x
Same name and namespace in other branches
- 3.x src/Command/ValidateCommand.php \Drupal\twig_tweak\Command\ValidateCommand
Implements twig-tweak:lint console command.
Hierarchy
- class \Drupal\twig_tweak\Command\LintCommand extends \Symfony\Component\Console\Command\Command
- class \Drupal\twig_tweak\Command\ValidateCommand
Expanded class hierarchy of ValidateCommand
1 string reference to 'ValidateCommand'
1 service uses ValidateCommand
File
- src/
Command/ ValidateCommand.php, line 10
Namespace
Drupal\twig_tweak\CommandView source
final class ValidateCommand extends LintCommand {
/**
* {@inheritdoc}
*/
protected static $defaultName = 'twig-tweak:validate';
/**
* {@inheritdoc}
*/
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
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LintCommand:: |
private | property | ||
LintCommand:: |
private | function | ||
LintCommand:: |
private | function | ||
LintCommand:: |
private | function | ||
LintCommand:: |
protected | function | ||
LintCommand:: |
protected | function | ||
LintCommand:: |
private | function | ||
LintCommand:: |
private | function | ||
LintCommand:: |
private | function | ||
LintCommand:: |
private | function | ||
LintCommand:: |
public | function | ||
ValidateCommand:: |
protected static | property |
Overrides LintCommand:: |
|
ValidateCommand:: |
protected | function |
Overrides LintCommand:: |