/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { AbstractCommand::execute($input, $output); try { if ($input->getOption('show')) { $output->writeln($this->getValidators($input)); } else { $this->checkOptions($input); $this->disableCodeValidation($input, $input->getOption('disable')); $this->disableProtection($input, $input->getOption('disable')); $this->disableAllValidators($input, $input->getOption('disable')); if ($this->isVerbose()) { if ($this->updated) { $output->writeln('Validation will be ignored for the next commit.'); } else { $output->writeln('You already defined this before.'); } } } } catch (Exception $e) { if ($this->isDebug()) { throw $e; } $output->writeln($e->getMessage()); return 1; } return 0; }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { AbstractCommand::execute($input, $output); $this->setValidatorStatus(); if ($this->isVerbose()) { $this->showResultMessage(); } return 0; }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { AbstractCommand::execute($input, $output); $this->connectionWizard(); //TODO Fix setting project name for GitHub if ($this->updated) { $this->output->writeln('Configuration updated.'); $this->output->writeln('Do not forget to share project commithook files with your team.'); $this->output->writeln('Enjoy!'); } return 0; }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { AbstractCommand::execute($input, $output); if ($this->getValue()) { $this->normalizeValue(); return $this->processValue(); } elseif ($this->shouldUnset()) { return $this->processValue(); } else { $this->showSetValues(); return 0; } }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); !defined('TEST_MODE') && define('TEST_MODE', true); $customFiles = $this->getCustomTestFiles($input, $output); /** * Define $vcsFiles for runner.php * * @see src/runner.php:87 * @var array|null $vcsFiles */ /** @noinspection PhpUnusedLocalVariableInspection */ $vcsFiles = $customFiles ?: null; /** @noinspection PhpUnusedLocalVariableInspection */ $hookFile = $this->askProjectDir() . '/.git/hooks/pre-commit'; require_once __DIR__ . '/../../../../runner.php'; return 0; }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws \Exception */ public function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); try { //init config $this->getConfig(); if (!$input->getOption('config') && !$input->getOption('issues')) { $this->getCacheClearHelper()->clear(); } elseif ($input->getOption('config')) { $this->getCacheClearHelper()->clearConfigCache(); } elseif ($input->getOption('issues')) { $this->getCacheClearHelper()->clearIssueCache(); } } catch (Exception $e) { if ($this->isVeryVerbose()) { throw $e; } else { $output->writeln($e->getMessage()); return 1; } } return 0; }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); if ($this->checkDeprecatedKey()) { return self::SHELL_CODE_COMMAND_DEPRECATED; } return $this->processValue(); }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { AbstractCommand::execute($input, $output); $this->showList(); return 0; }
/** * Execute command * * @param InputInterface $input * @param OutputInterface $output * @return int * @throws Exception */ public function execute(InputInterface $input, OutputInterface $output) { AbstractCommand::execute($input, $output); $this->setFormatterStyle(); return $this->processValue(); }