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:
twig_tweak.lint:
class: Drupal\twig_tweak\Command\TwigLintCommand
twig_tweak.validate:
class: Drupal\twig_tweak\Command\ValidateCommand
arguments: ['@twig']
tags:
- { 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.
*/
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 <info>friendsoftwig/twigcs</info> package.
TEXT;
$this->setHelp($this->getHelp() . $help);
TEXT
);
}
}
Loading…
Cancel
Save