Code Duplication    Length = 35-36 lines in 2 locations

src/Schema/Command/ExportCommand.php 1 location

@@ 22-56 (lines=35) @@
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected function configure()
23
    {
24
        $this
25
            ->setName('schema:export')
26
            ->setDescription('Export information block(s) to xml')
27
            ->addArgument(
28
                'type',
29
                InputArgument::REQUIRED,
30
                'Information iblock type'
31
            )
32
            ->addArgument(
33
                'code',
34
                InputArgument::REQUIRED,
35
                'Information iblock code'
36
            )
37
            ->addArgument(
38
                'dir',
39
                InputArgument::OPTIONAL,
40
                'Directory to export'
41
            )
42
            ->addOption(
43
                'sections',
44
                's',
45
                InputOption::VALUE_OPTIONAL,
46
                'Export sections [ "active", "all", "none" ]',
47
                'none'
48
            )
49
            ->addOption(
50
                'elements',
51
                'e',
52
                InputOption::VALUE_OPTIONAL,
53
                'Export elements [ "active", "all", "none" ]',
54
                'none'
55
            );
56
    }
57
58
    /**
59
     * {@inheritdoc}

src/Schema/Command/ImportCommand.php 1 location

@@ 22-57 (lines=36) @@
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected function configure()
23
    {
24
        $this
25
            ->setName('schema:import')
26
            ->setDescription('Import information block(s) from xml')
27
            ->addArgument(
28
                'type',
29
                InputArgument::REQUIRED,
30
                'Information iblock type'
31
            )
32
            ->addArgument(
33
                'sites',
34
                InputArgument::REQUIRED,
35
                'Sites to which the information iblock will be bound (if it is to be created)'
36
            )
37
            ->addArgument(
38
                'dir',
39
                InputArgument::OPTIONAL,
40
                'Directory to import'
41
            )
42
            ->addOption(
43
                'sections',
44
                's',
45
                InputOption::VALUE_OPTIONAL,
46
                'If an existing section is no longer in the source file [ leave: "N", deactivate: "A", delete: "D" ]',
47
                'A'
48
            )
49
            ->addOption(
50
                'elements',
51
                'e',
52
                InputOption::VALUE_OPTIONAL,
53
                'If an existing element is no longer in the source file [ leave: "N", deactivate: "A", delete: "D" ]',
54
                'A'
55
            );
56
57
    }
58
59
    /**
60
     * {@inheritdoc}