ApiKeyManagementCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/Command/ApiKey/ApiKeyManagementCommand.php
5
 *
6
 * @author TLe, Tarmo Leppänen <[email protected]>
7
 */
8
9
namespace App\Command\ApiKey;
10
11
use App\Command\Traits\ExecuteMultipleCommandTrait;
12
use Symfony\Component\Console\Attribute\AsCommand;
13
use Symfony\Component\Console\Command\Command;
14
15
/**
16
 * Class ApiKeyManagementCommand
17
 *
18
 * @package App\Command\ApiKey
19
 * @author TLe, Tarmo Leppänen <[email protected]>
20
 */
21
#[AsCommand(
22
    name: 'api-key:management',
23
    description: 'Console command to manage API keys',
24
)]
25
class ApiKeyManagementCommand extends Command
26
{
27
    use ExecuteMultipleCommandTrait;
28
29
    public function __construct()
30
    {
31
        parent::__construct();
32
33
        $this->setChoices([
34
            ListApiKeysCommand::NAME => 'List API keys',
35
            CreateApiKeyCommand::NAME => 'Create API key',
36
            EditApiKeyCommand::NAME => 'Edit API key',
37
            ChangeTokenCommand::NAME => 'Change API key token',
38
            RemoveApiKeyCommand::NAME => 'Remove API key',
39
            '0' => 'Exit',
40
        ]);
41
    }
42
}
43