Skip to content

Commit

Permalink
Add AsCommand attributes to console commands (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup authored Nov 12, 2024
1 parent b54de89 commit 59e2c17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symfony/Command/ToggleGetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
use SolidWorx\Toggler\ToggleInterface;
use function sprintf;
use function strpos;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'toggler:get', description: 'Get the status of a specific feature')]
class ToggleGetCommand extends Command
{
protected static $defaultName = 'toggler:get';
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Command/ToggleListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
use Symfony\Component\Console\Input\InputOption;
use function explode;
use function sprintf;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use function strpos;

#[AsCommand(name: 'toggler:list', description: 'List all the configured features')]
class ToggleListCommand extends Command
{
protected static $defaultName = 'toggler:list';
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Command/ToggleSetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
use SolidWorx\Toggler\Storage\StorageInterface;
use SolidWorx\Toggler\Util;
use function sprintf;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand(name: 'toggler:set', description: 'Change the status of a specific feature')]
class ToggleSetCommand extends Command
{
protected static $defaultName = 'toggler:set';
Expand Down

0 comments on commit 59e2c17

Please sign in to comment.