/** * @param OutputInterface $output * @param array $files * @param string $needle */ public function run(OutputInterface $output, array $files, $needle) { if ($this->isEnabled()) { $this->phpCsFixerHandler->setOutput($output); $this->phpCsFixerHandler->setFiles($files); $this->phpCsFixerHandler->setFilesToAnalize($needle); $this->phpCsFixerHandler->run(); } }
/** * @param OutputInterface $output * @param array $files * @param string $needle */ public function run(OutputInterface $output, array $files, $needle) { $data = $this->preCommitConfig->extraOptions($this->commandName()); if (true === $data['enabled']) { $this->phpCsFixerHandler->setOutput($output); $this->phpCsFixerHandler->setFiles($files); $this->phpCsFixerHandler->setLevels($data['levels']); $this->phpCsFixerHandler->setFilesToAnalyze($needle); $this->phpCsFixerHandler->run(); } }