Skip to content

Commit

Permalink
[console] Extend base commands. (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Jul 28, 2017
1 parent affa772 commit 5ba49f5
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 62 deletions.
7 changes: 4 additions & 3 deletions src/Command/AboutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Style\DrupalStyle;

/**
* Class AboutCommand
* @package Drupal\Console\Core\Command
*/
class AboutCommand extends Command
{
use CommandTrait;

/**
* {@inheritdoc}
Expand Down
4 changes: 1 addition & 3 deletions src/Command/Chain/ChainCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Command;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Yaml\Parser;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Utils\ChainDiscovery;
use Drupal\Console\Core\Command\Shared\InputTrait;
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\Console\Core\Command\Shared\CommandTrait;

/**
* Class ChainCommand
Expand All @@ -29,7 +28,6 @@
*/
class ChainCommand extends Command
{
use CommandTrait;
use InputTrait;

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Command/Chain/ChainCustomCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Command\Shared\InputTrait;

/**
Expand All @@ -22,7 +21,6 @@
*/
class ChainCustomCommand extends Command
{
use CommandTrait;
use InputTrait;

/**
Expand Down
6 changes: 1 addition & 5 deletions src/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command as BaseCommand;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Core\Utils\RequirementChecker;
use Drupal\Console\Core\Utils\ChainQueue;
Expand All @@ -21,10 +19,8 @@
*
* @package Drupal\Console\Core\Command
*/
class CheckCommand extends BaseCommand
class CheckCommand extends Command
{
use CommandTrait;

/**
* @var RequirementChecker
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Command/CompleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;

class CompleteCommand extends Command
{
use CommandTrait;

/**
* {@inheritdoc}
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Debug/ChainCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\ChainDiscovery;
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\Console\Core\Command\Shared\CommandTrait;

/**
* Class ChainCommand
Expand All @@ -21,8 +20,6 @@
*/
class ChainCommand extends Command
{
use CommandTrait;

/**
* @var ChainDiscovery
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Debug/SettingsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Core\Utils\NestedArray;
use Drupal\Console\Core\Style\DrupalStyle;
Expand All @@ -22,8 +21,6 @@
*/
class SettingsCommand extends Command
{
use CommandTrait;

/**
* @var ConfigurationManager
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Debug/SiteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Yaml\Dumper;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Core\Style\DrupalStyle;

Expand All @@ -23,8 +22,6 @@
*/
class SiteCommand extends Command
{
use CommandTrait;

/**
* @var ConfigurationManager
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Command/DrushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Core\Utils\ChainQueue;
use Drupal\Console\Core\Style\DrupalStyle;
Expand All @@ -23,8 +21,6 @@
*/
class DrushCommand extends Command
{
use CommandTrait;

/**
* @var ConfigurationManager
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Exclude/DrupliconCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Finder\Finder;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\TwigRenderer;
use Drupal\Console\Core\Style\DrupalStyle;

Expand All @@ -22,8 +21,6 @@
*/
class DrupliconCommand extends Command
{
use CommandTrait;

/**
* @var string
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Exclude/ElephpantCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Finder\Finder;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\TwigRenderer;
use Drupal\Console\Core\Style\DrupalStyle;

Expand All @@ -22,8 +21,6 @@
*/
class ElephpantCommand extends Command
{
use CommandTrait;

/**
* @var string
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Exec/ExecCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@

namespace Drupal\Console\Core\Command\Exec;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\ExecutableFinder;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Utils\ShellProcess;
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\Console\Core\Command\Command;

/**
* Class ExecCommand
Expand All @@ -24,8 +23,6 @@
*/
class ExecCommand extends Command
{
use CommandTrait;

/**
* @var ShellProcess
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Command/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\Console\Core\Helper\DescriptorHelper;

Expand All @@ -24,8 +22,6 @@
*/
class HelpCommand extends Command
{
use CommandTrait;

private $command;

/**
Expand Down
4 changes: 0 additions & 4 deletions src/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\ProcessBuilder;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Core\Generator\InitGenerator;
use Drupal\Console\Core\Utils\ShowFile;
Expand All @@ -26,8 +24,6 @@
*/
class InitCommand extends Command
{
use CommandTrait;

/**
* @var ShowFile
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
use Symfony\Component\Console\Input\InputOption;
use Drupal\Console\Core\Helper\DescriptorHelper;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Style\DrupalStyle;

/**
Expand All @@ -22,8 +20,6 @@
*/
class ListCommand extends Command
{
use CommandTrait;

/**
* {@inheritdoc}
*/
Expand Down
5 changes: 1 addition & 4 deletions src/Command/Settings/SetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Yaml\Dumper;
use Symfony\Component\Yaml\Parser;
use Symfony\Component\Console\Command\Command;
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
use Drupal\Console\Core\Utils\ConfigurationManager;
use Drupal\Console\Core\Utils\NestedArray;
use Drupal\Console\Core\Style\DrupalStyle;
Expand All @@ -25,8 +24,6 @@
*/
class SetCommand extends Command
{
use CommandTrait;

/**
* @var ConfigurationManager
*/
Expand Down

0 comments on commit 5ba49f5

Please sign in to comment.