Code Duplication    Length = 6-7 lines in 2 locations

src/N98/Util/Console/Helper/ParameterHelper.php 1 location

@@ 150-156 (lines=7) @@
147
            }
148
149
            $question = new ChoiceQuestion('Please select a website', $choices);
150
            $question->setValidator(function ($typeInput) use ($websites) {
151
                if (!isset($websites[$typeInput - 1])) {
152
                    throw new InvalidArgumentException('Invalid store');
153
                }
154
155
                return $websites[$typeInput - 1];
156
            });
157
158
            /** @var QuestionHelper $questionHelper */
159
            $questionHelper = $this->getHelperSet()->get('question');

src/N98/Magento/Command/System/Cron/AbstractCronCommand.php 1 location

@@ 218-223 (lines=6) @@
215
        }
216
217
        $question = new ChoiceQuestion('<question>Please select a job:</question>', $choices);
218
        $question->setValidator(function ($typeInput) use ($jobs) {
219
            if (!isset($jobs[$typeInput - 1])) {
220
                throw new \InvalidArgumentException('Invalid job');
221
            }
222
            return $jobs[$typeInput - 1]['Job'];
223
        });
224
225
        /** @var $questionHelper QuestionHelper */
226
        $questionHelper = $this->getHelper('question');