filesystem = $filesystem; $this->paths = $paths; } /** * Configure command. */ protected function configure(): void { $this->setDescription('Removes the commit hooks'); } /** * @return int|void */ public function execute(InputInterface $input, OutputInterface $output): int { $gitHooksPath = $this->paths->getGitHooksDir(); foreach (InitCommand::$hooks as $hook) { $hookPath = $this->filesystem->buildPath($gitHooksPath, $hook); if (!$this->filesystem->exists($hookPath)) { continue; } $this->filesystem->remove($hookPath); } $output->writeln('GrumPHP stopped sniffing your commits! Too bad ...'); return 0; } }