mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 13:16:45 +02:00
feat(console): rename commands utils
to tokens
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
|
@@ -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.');
|
||||
}
|
@@ -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.');
|
||||
}
|
@@ -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.');
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user