/** * @param Event $event */ public static function addServiceProvider(Event $event) { self::bootLaravel($event); self::$consoleInteraction->getInput()->setOption('composer', true); $finder = self::$app->make('Synga\\ServiceProviderHelper\\ServiceProviderAdder'); $serviceProviderFileParser = self::$app->make('Synga\\ServiceProviderHelper\\ServiceProviderFileParser'); $serviceProviderService = new ServiceProviderService(self::$consoleInteraction, $finder, $serviceProviderFileParser); $serviceProviderService->handle(); }
/** * Execute the console command. * * @return mixed */ public function handle(ServiceProviderAdder $finder, ServiceProviderFileParser $serviceProviderFileParser) { $consoleInteraction = new ConsoleInteraction(new Input($this->input), new Output($this)); $serviceProviderService = new ServiceProviderService($consoleInteraction, $finder, $serviceProviderFileParser); $serviceProviderService->handle(); }