Code Duplication    Length = 19-23 lines in 2 locations

src/Kunstmaan/GeneratorBundle/Command/GenerateAdminTestsCommand.php 1 location

@@ 72-90 (lines=19) @@
69
    /**
70
     * {@inheritdoc}
71
     */
72
    protected function interact(InputInterface $input, OutputInterface $output)
73
    {
74
        if (Kernel::VERSION_ID >= 40000) {
75
            return;
76
        }
77
78
        $questionHelper = $this->getQuestionHelper();
79
        $questionHelper->writeSection($output, 'Welcome to the Kunstmaan default site generator');
80
81
        $inputAssistant = GeneratorUtils::getInputAssistant($input, $output, $questionHelper, $this->getApplication()->getKernel(), $this->getContainer());
82
83
        $inputAssistant->askForNamespace(array(
84
            '',
85
            'This command helps you to generate tests to test the admin of the default site setup.',
86
            'You must specify the namespace of the bundle where you want to generate the tests.',
87
            'Use <comment>/</comment> instead of <comment>\\ </comment>for the namespace delimiter to avoid any problem.',
88
            '',
89
        ));
90
    }
91
92
    protected function createGenerator()
93
    {

src/Kunstmaan/GeneratorBundle/Command/GenerateSearchPageCommand.php 1 location

@@ 98-120 (lines=23) @@
95
        return 0;
96
    }
97
98
    protected function interact(InputInterface $input, OutputInterface $output)
99
    {
100
        $questionHelper = $this->getQuestionHelper();
101
        $questionHelper->writeSection($output, 'Welcome to the SearchPage generator');
102
103
        $inputAssistant = GeneratorUtils::getInputAssistant($input, $output, $questionHelper, $this->getApplication()->getKernel(), $this->getContainer());
104
105
        if (Kernel::VERSION_ID >= 40000) {
106
            $inputAssistant->askForPrefix();
107
108
            return;
109
        }
110
111
        $inputAssistant->askForNamespace(array(
112
            '',
113
            'This command helps you to generate a SearchPage.',
114
            'You must specify the namespace of the bundle where you want to generate the SearchPage in.',
115
            'Use <comment>/</comment> instead of <comment>\\ </comment>for the namespace delimiter to avoid any problem.',
116
            '',
117
        ));
118
119
        $inputAssistant->askForPrefix();
120
    }
121
122
    protected function createGenerator()
123
    {