Code Duplication    Length = 10-10 lines in 2 locations

src/Command/Generate/CrudCommand.php 1 location

@@ 62-71 (lines=10) @@
59
                );
60
            }
61
62
            if ($module = $input->getArgument('module')) {
63
                $this->getDefinition()->getArgument('module')->validate($module);
64
65
                if (!$this->getApplication()->isModuleExists($module)) {
66
                    throw new InputException(
67
                        "Module $module is not exist, " .
68
                        "run command <question>bluzman generate:module $module</question> before"
69
                    );
70
                }
71
            }
72
73
            // generate directories and files
74
            $this->generate($input, $output);

src/Command/Generate/GridCommand.php 1 location

@@ 63-72 (lines=10) @@
60
                );
61
            }
62
63
            if ($module = $input->getArgument('module')) {
64
                $this->getDefinition()->getArgument('module')->validate($module);
65
66
                if (!$this->getApplication()->isModuleExists($module)) {
67
                    throw new InputException(
68
                        "Module $module is not exist, " .
69
                        "run command <question>bluzman generate:module $module</question> before"
70
                    );
71
                }
72
            }
73
74
            // generate directories and files
75
            $this->generate($input, $output);