Code Duplication    Length = 16-20 lines in 2 locations

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

@@ 40-59 (lines=20) @@
37
 */
38
final class BootstrapIdentityWithSmsSecondFactorCommand extends AbstractBootstrapCommand
39
{
40
    protected function configure()
41
    {
42
        $this
43
            ->setDescription('Creates an identity with a SMS second factor')
44
            ->addArgument('name-id', InputArgument::REQUIRED, 'The NameID of the identity to create')
45
            ->addArgument('institution', InputArgument::REQUIRED, 'The institution of the identity to create')
46
            ->addArgument('common-name', InputArgument::REQUIRED, 'The Common Name of the identity to create')
47
            ->addArgument('email', InputArgument::REQUIRED, 'The e-mail address of the identity to create')
48
            ->addArgument('preferred-locale', InputArgument::REQUIRED, 'The preferred locale of the identity to create')
49
            ->addArgument(
50
                'phone-number',
51
                InputArgument::REQUIRED,
52
                'The phone number of the user should be formatted like "+31 (0) 612345678"'
53
            )
54
            ->addArgument(
55
                'registration-status',
56
                InputArgument::REQUIRED,
57
                'Valid arguments: unverified, verified, vetted'
58
            );
59
    }
60
61
    protected function execute(InputInterface $input, OutputInterface $output)
62
    {

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
    {