Browse Source

Rename twig-validate command class

merge-requests/2/head
Chi 4 years ago
parent
commit
326c45b0fa
  1. 4
      drush.services.yml
  2. 11
      src/Command/ValidateCommand.php

4
drush.services.yml

@ -1,6 +1,6 @@
services: services:
twig_tweak.lint: twig_tweak.validate:
class: Drupal\twig_tweak\Command\TwigLintCommand class: Drupal\twig_tweak\Command\ValidateCommand
arguments: ['@twig'] arguments: ['@twig']
tags: tags:
- { name: console.command } - { name: console.command }

11
src/Command/TwigLintCommand.php → src/Command/ValidateCommand.php

@ -7,7 +7,7 @@ use Symfony\Component\Finder\Finder;
/** /**
* Implements twig-tweak:lint console command. * Implements twig-tweak:lint console command.
*/ */
final class TwigLintCommand extends LintCommand { final class ValidateCommand extends LintCommand {
/** /**
* {@inheritdoc} * {@inheritdoc}
@ -25,14 +25,13 @@ final class TwigLintCommand extends LintCommand {
parent::configure(); parent::configure();
$this->setAliases(['twig-validate']); $this->setAliases(['twig-validate']);
$this->setHelp(
$help = <<< 'TEXT' $this->getHelp() . <<< 'TEXT'
This command only validates Twig Syntax. For checking code style This command only validates Twig Syntax. For checking code style
consider using <info>friendsoftwig/twigcs</info> package. consider using <info>friendsoftwig/twigcs</info> package.
TEXT; TEXT
);
$this->setHelp($this->getHelp() . $help);
} }
} }
Loading…
Cancel
Save