JonathanTorres\Construct\Commands\ConstructCommand::configure PHP Method

configure() protected method

Command configuration.
protected configure ( ) : void
return void
    protected function configure()
    {
        $nameDescription = 'The vendor/project name';
        $testFrameworkDescription = 'Testing framework (one of: ' . join(', ', $this->defaults->testingFrameworks) . ')';
        $licenseDescription = 'License (one of: ' . join(', ', $this->defaults->licenses) . ')';
        $namespaceDescription = 'Namespace for project';
        $gitDescription = 'Initialize an empty Git repo';
        $phpcsDescription = 'Generate a PHP Coding Standards Fixer configuration';
        $keywordsDescription = 'Comma separated list of Composer keywords';
        $vagrantDescription = 'Generate a Vagrantfile';
        $editorConfigDescription = 'Generate an EditorConfig configuration';
        $phpVersionDescription = 'Project minimun required php version (one of: ' . join(', ', $this->defaults->phpVersions) . ')';
        $environmentDescription = 'Generate .env environment files';
        $lgtmDescription = 'Generate LGTM configuration files';
        $githubTemplatesDescription = 'Generate GitHub templates';
        $githubDocsDescription = 'Generate GitHub docs';
        $githubDescription = 'Generate GitHub templates and docs';
        $codeOfConductDescription = 'Generate Code of Conduct file';
        $configurationDescription = 'Generate from configuration file';
        $ignoreDefaultConfigurationDescription = 'Ignore present default configuration file';
        $configurationDefault = $this->filesystem->getDefaultConfigurationFile();
        $this->setName('generate');
        $this->setDescription('Generates a basic PHP project/micro-package');
        $this->addArgument('name', InputArgument::REQUIRED, $nameDescription);
        $this->addOption('test', 't', InputOption::VALUE_OPTIONAL, $testFrameworkDescription, Defaults::TEST_FRAMEWORK);
        $this->addOption('test-framework', null, InputOption::VALUE_OPTIONAL, $testFrameworkDescription, Defaults::TEST_FRAMEWORK);
        $this->addOption('license', 'l', InputOption::VALUE_OPTIONAL, $licenseDescription, Defaults::LICENSE);
        $this->addOption('namespace', 's', InputOption::VALUE_OPTIONAL, $namespaceDescription, Defaults::PROJECT_NAMESPACE);
        $this->addOption('git', 'g', InputOption::VALUE_NONE, $gitDescription);
        $this->addOption('phpcs', 'p', InputOption::VALUE_NONE, $phpcsDescription);
        $this->addOption('keywords', 'k', InputOption::VALUE_OPTIONAL, $keywordsDescription);
        $this->addOption('vagrant', null, InputOption::VALUE_NONE, $vagrantDescription);
        $this->addOption('editor-config', 'e', InputOption::VALUE_NONE, $editorConfigDescription);
        $this->addOption('php', null, InputOption::VALUE_OPTIONAL, $phpVersionDescription, $this->systemPhpVersion);
        $this->addOption('env', null, InputOption::VALUE_NONE, $environmentDescription);
        $this->addOption('lgtm', null, InputOption::VALUE_NONE, $lgtmDescription);
        $this->addOption('github', null, InputOption::VALUE_NONE, $githubDescription);
        $this->addOption('github-templates', null, InputOption::VALUE_NONE, $githubTemplatesDescription);
        $this->addOption('github-docs', null, InputOption::VALUE_NONE, $githubDocsDescription);
        $this->addOption('code-of-conduct', null, InputOption::VALUE_NONE, $codeOfConductDescription);
        $this->addOption('config', 'c', InputOption::VALUE_OPTIONAL, $configurationDescription, $configurationDefault);
        $this->addOption('ignore-default-config', 'i', InputOption::VALUE_NONE, $ignoreDefaultConfigurationDescription);
    }