88use Illuminate \Support \Arr ;
99use Illuminate \Support \Facades \Process ;
1010use Illuminate \Support \Str ;
11- use Laravel \Boost \Install \InstallPrompt ;
1211use Laravel \Prompts \Concerns \Colors ;
13- use Laravel \Prompts \Prompt ;
1412use Symfony \Component \Console \Attribute \AsCommand ;
1513use Symfony \Component \Finder \Finder ;
1614
@@ -32,18 +30,25 @@ class InstallCommand extends Command
3230
3331 /** @var string[] */
3432 protected array $ installedIdes = [];
33+
3534 protected array $ detectedProjectIdes = [];
3635
3736 protected bool $ enforceTests = true ;
37+
3838 protected array $ idesToInstallTo = ['other ' ];
39+
3940 protected array $ boostToInstall = [];
41+
4042 protected array $ boostToolsToDisable = [];
43+
4144 protected array $ detectedProjectAgents = [];
45+
4246 protected array $ agentsToInstallTo = [];
4347
4448 public function handle (): void
4549 {
46- $ this ->colors = new class {
50+ $ this ->colors = new class
51+ {
4752 use Colors;
4853 };
4954
@@ -59,7 +64,7 @@ protected function detect()
5964 {
6065 $ this ->installedIdes = $ this ->detectInstalledIdes ();
6166 $ this ->detectedProjectIdes = $ this ->detectIdesUsedInProject ();
62- // $this->detectedProjectAgents = $this->detectProjectAgents(); // TODO: Roo, Cline, Copilot
67+ // $this->detectedProjectAgents = $this->detectProjectAgents(); // TODO: Roo, Cline, Copilot
6368 }
6469
6570 protected function query ()
@@ -71,8 +76,7 @@ protected function query()
7176
7277 // Which parts of boost should we install
7378 $ this ->boostToInstall = $ this ->boostToInstall ();
74- // $this->boostToolsToDisable = $this->boostToolsToDisable(); // Not useful to start
75-
79+ // $this->boostToolsToDisable = $this->boostToolsToDisable(); // Not useful to start
7680
7781 }
7882
@@ -152,7 +156,7 @@ protected function discoverTools(): array
152156 ->name ('*.php ' );
153157
154158 foreach ($ finder as $ toolFile ) {
155- $ fqdn = 'Laravel \\Boost \\Mcp \\Tools \\' . $ toolFile ->getBasename ('.php ' );
159+ $ fqdn = 'Laravel \\Boost \\Mcp \\Tools \\' . $ toolFile ->getBasename ('.php ' );
156160 if (class_exists ($ fqdn )) {
157161 $ tools [$ fqdn ] = Str::headline ($ toolFile ->getBasename ('.php ' ));
158162 }
@@ -166,7 +170,7 @@ protected function discoverTools(): array
166170 public function getHomePath (): string
167171 {
168172 if (PHP_OS_FAMILY === 'Windows ' ) {
169- if (!isset ($ _SERVER ['HOME ' ])) {
173+ if (! isset ($ _SERVER ['HOME ' ])) {
170174 $ _SERVER ['HOME ' ] = $ _SERVER ['USERPROFILE ' ];
171175 }
172176
@@ -180,22 +184,22 @@ protected function isHerdInstalled(): bool
180184 {
181185 $ isWindows = PHP_OS_FAMILY === 'Windows ' ;
182186
183- if (!$ isWindows ) {
187+ if (! $ isWindows ) {
184188 return file_exists ('/Applications/Herd.app/Contents/MacOS/Herd ' );
185189 }
186190
187- return is_dir ($ this ->getHomePath () . '/.config/herd ' );
191+ return is_dir ($ this ->getHomePath (). '/.config/herd ' );
188192 }
189193
190194 protected function isHerdMCPAvailable (): bool
191195 {
192196 $ isWindows = PHP_OS_FAMILY === 'Windows ' ;
193197
194198 if ($ isWindows ) {
195- return file_exists ($ this ->getHomePath () . '/.config/herd/bin/herd-mcp.phar ' );
199+ return file_exists ($ this ->getHomePath (). '/.config/herd/bin/herd-mcp.phar ' );
196200 }
197201
198- return file_exists ($ this ->getHomePath () . '/Library/Application Support/Herd/bin/herd-mcp.phar ' );
202+ return file_exists ($ this ->getHomePath (). '/Library/Application Support/Herd/bin/herd-mcp.phar ' );
199203 }
200204
201205 /*
@@ -222,7 +226,7 @@ private function intro()
222226HEADER
223227 );
224228 intro ('✦ Laravel Boost :: Install :: We Must Ship ✦ ' );
225- $ this ->line (' Let \'s setup Laravel Boost in your IDEs for ' . $ this ->colors ->bgYellow ($ this ->colors ->black ($ this ->projectName )));
229+ $ this ->line (' Let \'s setup Laravel Boost in your IDEs for ' . $ this ->colors ->bgYellow ($ this ->colors ->black ($ this ->projectName )));
226230 }
227231
228232 protected function projectPurpose (): string
@@ -243,17 +247,17 @@ protected function projectPurpose(): string
243247 protected function shouldEnforceTests (bool $ ask = true ): bool
244248 {
245249 $ enforce = Finder::create ()
246- ->in (base_path ('tests ' ))
247- ->files ()
248- ->name ('*.php ' )
249- ->count () > 6 ;
250+ ->in (base_path ('tests ' ))
251+ ->files ()
252+ ->name ('*.php ' )
253+ ->count () > 6 ;
250254
251255 if ($ enforce === false && $ ask === true ) {
252256 $ enforce = select (
253- label: 'Should AI always create tests? ' ,
254- options: ['Yes ' , 'No ' ],
255- default: 'Yes '
256- ) === 'Yes ' ;
257+ label: 'Should AI always create tests? ' ,
258+ options: ['Yes ' , 'No ' ],
259+ default: 'Yes '
260+ ) === 'Yes ' ;
257261 }
258262
259263 return $ enforce ;
@@ -271,7 +275,7 @@ protected function idesToInstallTo(): array
271275 ];
272276
273277 // Tell API which ones?
274- $ autoDetectedIdesString = Arr::join (array_map (fn (string $ ideKey ) => $ ideOptions [$ ideKey ] ?? '' , $ this ->detectedProjectIdes ), ', ' , ' & ' );
278+ $ autoDetectedIdesString = Arr::join (array_map (fn (string $ ideKey ) => $ ideOptions [$ ideKey ] ?? '' , $ this ->detectedProjectIdes ), ', ' , ' & ' );
275279
276280 return multiselect (
277281 label: sprintf ('Which IDEs do you use in %s? (space to select) ' , $ this ->projectName ),
@@ -316,14 +320,8 @@ protected function boostToolsToDisable(): array
316320 );
317321 }
318322
319- protected function detectProjectAgents (): array
320- {
321-
322- }
323+ protected function detectProjectAgents (): array {}
323324
324- /**
325- * @return array
326- */
327325 protected function agentsToInstallTo (): array
328326 {
329327 return [];
0 commit comments