Skip to content

Commit

Permalink
Move state:debug to debug:state (#3397)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauhg authored and jmolivas committed Jul 5, 2017
1 parent dbc59da commit 424cad6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
5 changes: 5 additions & 0 deletions config/services/drupal-console/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ services:
class: Drupal\Console\Command\Debug\ViewsPluginsCommand
tags:
- { name: drupal.command }
console.state_debug:
class: Drupal\Console\Command\Debug\StateCommand
arguments: ['@state', '@keyvalue']
tags:
- { name: drupal.command }
5 changes: 0 additions & 5 deletions config/services/drupal-console/state.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
services:
console.state_debug:
class: Drupal\Console\Command\State\DebugCommand
arguments: ['@state', '@keyvalue']
tags:
- { name: drupal.command }
console.state_delete:
class: Drupal\Console\Command\State\DeleteCommand
arguments: ['@state', '@keyvalue']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* @file
* Contains \Drupal\Console\Command\State\DebugCommand.
* Contains \Drupal\Console\Command\Debug\DebugCommand.
*/

namespace Drupal\Console\Command\State;
namespace Drupal\Console\Command\Debug;

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -20,9 +20,9 @@
/**
* Class DebugCommand
*
* @package Drupal\Console\Command\State
* @package Drupal\Console\Command\Debug
*/
class DebugCommand extends Command
class StateCommand extends Command
{
use CommandTrait;

Expand Down Expand Up @@ -57,13 +57,13 @@ public function __construct(
protected function configure()
{
$this
->setName('state:debug')
->setDescription($this->trans('commands.state.debug.description'))
->setHelp($this->trans('commands.state.debug.help'))
->setName('debug:state')
->setDescription($this->trans('commands.debug.state.description'))
->setHelp($this->trans('commands.debug.state.help'))
->addArgument(
'key',
InputArgument::OPTIONAL,
$this->trans('commands.state.debug.arguments.key')
$this->trans('commands.debug.state.arguments.key')
);
}

Expand All @@ -82,7 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
return 0;
}

$tableHeader = [$this->trans('commands.state.debug.messages.key')];
$tableHeader = [$this->trans('commands.debug.state.messages.key')];
$keyStoreStates = array_keys($this->keyValue->get('state')->getAll());
$io->table($tableHeader, $keyStoreStates);

Expand Down

0 comments on commit 424cad6

Please sign in to comment.