setDefinition([ new InputArgument('name', InputArgument::REQUIRED, 'helper name'), ]); } public function getDescription() { return 'Generates new helper'; } public function execute(InputInterface $input, OutputInterface $output) { $name = ucfirst($input->getArgument('name')); $config = $this->getGlobalConfig(); $path = $this->createDirectoryFor(Configuration::supportDir() . 'Helper', $name); $filename = $path . $this->getShortClassName($name) . '.php'; $res = $this->createFile($filename, (new Helper($name, $config['namespace']))->produce()); if ($res) { $output->writeln("Helper $filename created"); } else { $output->writeln("Error creating helper $filename"); } } }