diff --git a/drush.services.yml b/drush.services.yml index db24098..6cfc0aa 100644 --- a/drush.services.yml +++ b/drush.services.yml @@ -1,6 +1,6 @@ services: - twig_tweak.lint: - class: Drupal\twig_tweak\Command\TwigLintCommand + twig_tweak.validate: + class: Drupal\twig_tweak\Command\ValidateCommand arguments: ['@twig'] tags: - { name: console.command } diff --git a/src/Command/TwigLintCommand.php b/src/Command/ValidateCommand.php similarity index 83% rename from src/Command/TwigLintCommand.php rename to src/Command/ValidateCommand.php index e95c651..57c6645 100644 --- a/src/Command/TwigLintCommand.php +++ b/src/Command/ValidateCommand.php @@ -7,7 +7,7 @@ use Symfony\Component\Finder\Finder; /** * Implements twig-tweak:lint console command. */ -final class TwigLintCommand extends LintCommand { +final class ValidateCommand extends LintCommand { /** * {@inheritdoc} @@ -25,14 +25,13 @@ final class TwigLintCommand extends LintCommand { parent::configure(); $this->setAliases(['twig-validate']); - - $help = <<< 'TEXT' + $this->setHelp( + $this->getHelp() . <<< 'TEXT' This command only validates Twig Syntax. For checking code style consider using friendsoftwig/twigcs package. - TEXT; - - $this->setHelp($this->getHelp() . $help); + TEXT + ); } }