diff --git a/src/flextype/core/Console/Commands/Utils/CreateTokenCommand.php b/src/flextype/core/Console/Commands/Tokens/TokensCreateCommand.php similarity index 93% rename from src/flextype/core/Console/Commands/Utils/CreateTokenCommand.php rename to src/flextype/core/Console/Commands/Tokens/TokensCreateCommand.php index 114c0bc1..b34d708f 100644 --- a/src/flextype/core/Console/Commands/Utils/CreateTokenCommand.php +++ b/src/flextype/core/Console/Commands/Tokens/TokensCreateCommand.php @@ -14,7 +14,7 @@ declare(strict_types=1); * Redistributions of files must retain the above copyright notice. */ -namespace Flextype\Console\Commands\Utils; +namespace Flextype\Console\Commands\Tokens; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -23,11 +23,11 @@ use Symfony\Component\Console\Input\InputArgument; use function Thermage\div; use function Thermage\renderToString; -class CreateTokenCommand extends Command +class TokensCreateCommand extends Command { protected function configure(): void { - $this->setName('utils:create-token'); + $this->setName('tokens:create'); $this->setDescription('Create a new unique token.'); } diff --git a/src/flextype/core/Console/Commands/Utils/GenerateTokenCommand.php b/src/flextype/core/Console/Commands/Tokens/TokensGenerateCommand.php similarity index 90% rename from src/flextype/core/Console/Commands/Utils/GenerateTokenCommand.php rename to src/flextype/core/Console/Commands/Tokens/TokensGenerateCommand.php index d44ce832..e9d4b24a 100644 --- a/src/flextype/core/Console/Commands/Utils/GenerateTokenCommand.php +++ b/src/flextype/core/Console/Commands/Tokens/TokensGenerateCommand.php @@ -14,7 +14,7 @@ declare(strict_types=1); * Redistributions of files must retain the above copyright notice. */ -namespace Flextype\Console\Commands\Utils; +namespace Flextype\Console\Commands\Tokens; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -23,11 +23,11 @@ use Symfony\Component\Console\Input\InputArgument; use function Thermage\div; use function Thermage\renderToString; -class GenerateTokenCommand extends Command +class TokensGenerateCommand extends Command { protected function configure(): void { - $this->setName('utils:generate-token'); + $this->setName('tokens:generate'); $this->setDescription('Generate token.'); $this->addArgument('length', InputArgument::OPTIONAL, 'Token string length.'); } diff --git a/src/flextype/core/Console/Commands/Utils/GenerateTokenHashCommand.php b/src/flextype/core/Console/Commands/Tokens/TokensGenerateHashCommand.php similarity index 90% rename from src/flextype/core/Console/Commands/Utils/GenerateTokenHashCommand.php rename to src/flextype/core/Console/Commands/Tokens/TokensGenerateHashCommand.php index 727830b6..d81e1147 100644 --- a/src/flextype/core/Console/Commands/Utils/GenerateTokenHashCommand.php +++ b/src/flextype/core/Console/Commands/Tokens/TokensGenerateHashCommand.php @@ -14,7 +14,7 @@ declare(strict_types=1); * Redistributions of files must retain the above copyright notice. */ -namespace Flextype\Console\Commands\Utils; +namespace Flextype\Console\Commands\Tokens; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -23,11 +23,11 @@ use Symfony\Component\Console\Input\InputArgument; use function Thermage\div; use function Thermage\renderToString; -class GenerateTokenHashCommand extends Command +class TokensGenerateHashCommand extends Command { protected function configure(): void { - $this->setName('utils:generate-token-hash'); + $this->setName('tokens:generate-hash'); $this->setDescription('Generate token hash.'); $this->addArgument('token', InputArgument::OPTIONAL, 'Token string.'); } diff --git a/src/flextype/core/Console/Commands/Utils/VerifyTokenHashCommand.php b/src/flextype/core/Console/Commands/Tokens/TokensVerifyHashCommand.php similarity index 92% rename from src/flextype/core/Console/Commands/Utils/VerifyTokenHashCommand.php rename to src/flextype/core/Console/Commands/Tokens/TokensVerifyHashCommand.php index b38adfb3..b1274913 100644 --- a/src/flextype/core/Console/Commands/Utils/VerifyTokenHashCommand.php +++ b/src/flextype/core/Console/Commands/Tokens/TokensVerifyHashCommand.php @@ -14,7 +14,7 @@ declare(strict_types=1); * Redistributions of files must retain the above copyright notice. */ -namespace Flextype\Console\Commands\Utils; +namespace Flextype\Console\Commands\Tokens; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -24,11 +24,11 @@ use Symfony\Component\Console\Style\SymfonyStyle; use function Thermage\div; use function Thermage\renderToString; -class VerifyTokenHashCommand extends Command +class TokensVerifyHashCommand extends Command { protected function configure(): void { - $this->setName('utils:verify-token-hash'); + $this->setName('tokens:verify-hash'); $this->setDescription('Verify token hash.'); $this->addArgument('token', InputArgument::REQUIRED, 'Token.'); $this->addArgument('token-hash', InputArgument::REQUIRED, 'Token hash.'); diff --git a/src/flextype/core/Console/FlextypeConsole.php b/src/flextype/core/Console/FlextypeConsole.php index 1e439bcc..f4a1aad3 100644 --- a/src/flextype/core/Console/FlextypeConsole.php +++ b/src/flextype/core/Console/FlextypeConsole.php @@ -35,10 +35,10 @@ use Flextype\Console\Commands\Cache\CacheClearRoutesCommand; use Flextype\Console\Commands\Cache\CacheClearConfigCommand; use Flextype\Console\Commands\Cache\CacheClearDataCommand; use Flextype\Console\Commands\Cache\CacheHasCommand; -use Flextype\Console\Commands\Utils\GenerateTokenCommand; -use Flextype\Console\Commands\Utils\GenerateTokenHashCommand; -use Flextype\Console\Commands\Utils\VerifyTokenHashCommand; -use Flextype\Console\Commands\Utils\CreateTokenCommand; +use Flextype\Console\Commands\Tokens\TokensGenerateCommand; +use Flextype\Console\Commands\Tokens\TokensGenerateHashCommand; +use Flextype\Console\Commands\Tokens\TokensVerifyHashCommand; +use Flextype\Console\Commands\Tokens\TokensCreateCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -65,10 +65,10 @@ class FlextypeConsole extends ConsoleApplication console()->add(new CacheClearConfigCommand()); console()->add(new CacheClearDataCommand()); console()->add(new CacheHasCommand()); - console()->add(new GenerateTokenCommand()); - console()->add(new GenerateTokenHashCommand()); - console()->add(new VerifyTokenHashCommand()); - console()->add(new CreateTokenCommand()); + console()->add(new TokensGenerateCommand()); + console()->add(new TokensGenerateHashCommand()); + console()->add(new TokensVerifyHashCommand()); + console()->add(new TokensCreateCommand()); parent::run(); }