/** * Handles the "puli plugin --install" command. * * @param Args $args The console arguments * * @return int The status code */ public function handleInstall(Args $args) { $pluginClass = $args->getArgument('class'); if ($this->manager->hasPluginClass($pluginClass)) { throw new RuntimeException(sprintf('The plugin class "%s" is already installed.', $pluginClass)); } $this->manager->addPluginClass($pluginClass); return 0; }