Code Duplication    Length = 5-9 lines in 5 locations

Command/CreateCardCommand.php 3 locations

@@ 76-84 (lines=9) @@
73
     */
74
    protected function interact(InputInterface $input, OutputInterface $output)
75
    {
76
        if (!$input->getArgument('title')) {
77
            $value = $this->getHelper('dialog')->askAndValidate(
78
                $output,
79
                'Please enter (Title): ',
80
                [$this, 'validateTitle'],
81
                1
82
            );
83
            $input->setArgument('title', $value);
84
        }
85
86
        if (!$input->getArgument('content')) {
87
            $value = $this->getHelper('dialog')->askAndValidate(
@@ 86-94 (lines=9) @@
83
            $input->setArgument('title', $value);
84
        }
85
86
        if (!$input->getArgument('content')) {
87
            $value = $this->getHelper('dialog')->askAndValidate(
88
                $output,
89
                'Please enter (Content): ',
90
                [$this, 'validateContent'],
91
                1
92
            );
93
            $input->setArgument('content', $value);
94
        }
95
96
        if (!$input->getArgument('category')) {
97
            $value = $this->getHelper('dialog')->askAndValidate(
@@ 96-104 (lines=9) @@
93
            $input->setArgument('content', $value);
94
        }
95
96
        if (!$input->getArgument('category')) {
97
            $value = $this->getHelper('dialog')->askAndValidate(
98
                $output,
99
                'Please enter (Category ID): ',
100
                [$this, 'validateCategory'],
101
                1
102
            );
103
            $input->setArgument('category', $value);
104
        }
105
    }
106
107
    /**

Command/CreateCategoryCommand.php 2 locations

@@ 73-77 (lines=5) @@
70
     */
71
    protected function interact(InputInterface $input, OutputInterface $output)
72
    {
73
        if (!$input->getArgument('title')) {
74
            $value = $this->getHelper('dialog')->askAndValidate($output, 'Please enter (Title): ',
75
                [$this, 'validateTitle'], 1);
76
            $input->setArgument('title', $value);
77
        }
78
79
        if (!$input->getArgument('parent')) {
80
            $value = $this->getHelper('dialog')->askAndValidate($output, 'Please enter (Parent category ID): ',
@@ 79-83 (lines=5) @@
76
            $input->setArgument('title', $value);
77
        }
78
79
        if (!$input->getArgument('parent')) {
80
            $value = $this->getHelper('dialog')->askAndValidate($output, 'Please enter (Parent category ID): ',
81
                [$this, 'validateParent'], 1);
82
            $input->setArgument('parent', $value);
83
        }
84
    }
85
86
    /**