/** * @param InputInterface $input * @param OutputInterface $output * @return bool */ protected function execute(InputInterface $input, OutputInterface $output) { if ($isNotPackage = $this->builder->isNotPackageRoot()) { $output->writeln("<error>Cannot generate file. Generator commands must be run from the root of a composer package.</error>"); } return !$isNotPackage; }
/** * Create directory tree. * * @param string $dir * @return bool */ public function makeDirectory($dir = '') { $dirPath = rtrim($this->outputPath . '/' . ltrim($dir, '/'), '/'); parent::makeDirectory($dirPath); // Directory was created if ($this->filesystem->exists($dirPath)) { return true; } return false; }