Code Duplication    Length = 16-21 lines in 2 locations

src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithYubikeySecondFactorCommand.php 1 location

@@ 35-50 (lines=16) @@
32
33
final class BootstrapIdentityWithYubikeySecondFactorCommand extends Command
34
{
35
    protected function configure()
36
    {
37
        $this
38
            ->setName('middleware:bootstrap:identity-with-yubikey')
39
            ->setDescription('Creates an identity with a vetted Yubikey second factor')
40
            ->addArgument('name-id', InputArgument::REQUIRED, 'The NameID of the identity to create')
41
            ->addArgument('institution', InputArgument::REQUIRED, 'The institution of the identity to create')
42
            ->addArgument('common-name', InputArgument::REQUIRED, 'The Common Name of the identity to create')
43
            ->addArgument('email', InputArgument::REQUIRED, 'The e-mail address of the identity to create')
44
            ->addArgument('preferred-locale', InputArgument::REQUIRED, 'The preferred locale of the identity to create')
45
            ->addArgument(
46
                'yubikey',
47
                InputArgument::REQUIRED,
48
                'The public ID of the Yubikey. Remove the last 32 characters of a Yubikey OTP to acquire this.'
49
            );
50
    }
51
52
    protected function execute(InputInterface $input, OutputInterface $output)
53
    {

src/Surfnet/StepupMiddleware/MiddlewareBundle/Console/Command/BootstrapIdentityWithSmsSecondFactorCommand.php 1 location

@@ 79-99 (lines=21) @@
76
        $this->tokenStorage = $tokenStorage;
77
    }
78
79
    protected function configure()
80
    {
81
        $this
82
            ->setName('middleware:bootstrap:identity-with-sms')
83
            ->setDescription('Creates an identity with a SMS second factor')
84
            ->addArgument('name-id', InputArgument::REQUIRED, 'The NameID of the identity to create')
85
            ->addArgument('institution', InputArgument::REQUIRED, 'The institution of the identity to create')
86
            ->addArgument('common-name', InputArgument::REQUIRED, 'The Common Name of the identity to create')
87
            ->addArgument('email', InputArgument::REQUIRED, 'The e-mail address of the identity to create')
88
            ->addArgument('preferred-locale', InputArgument::REQUIRED, 'The preferred locale of the identity to create')
89
            ->addArgument(
90
                'phone-number',
91
                InputArgument::REQUIRED,
92
                'The phone number of the user should be formatted like "+31 (0) 612345678"'
93
            )
94
            ->addArgument(
95
                'registration-status',
96
                InputArgument::REQUIRED,
97
                'Valid arguments: unverified, verified, vetted'
98
            );
99
    }
100
101
    protected function execute(InputInterface $input, OutputInterface $output)
102
    {