@@ -56,7 +56,8 @@ public function handle(Roster $roster): void
5656 {
5757 $ this ->agentsToInstallTo = collect ();
5858 $ this ->roster = $ roster ;
59- $ this ->colors = new class {
59+ $ this ->colors = new class
60+ {
6061 use Colors;
6162 };
6263
@@ -105,7 +106,6 @@ protected function enact()
105106 dump ($ this ->idesToInstallTo );
106107 }
107108
108-
109109 if (in_array ('other ' , $ this ->idesToInstallTo )) {
110110 $ this ->newLine ();
111111 $ this ->line ('Add to your mcp file: ./artisan boost:mcp ' ); // some ides require absolute
@@ -150,13 +150,13 @@ protected function compose(): string
150150 $ composed ->put ('tests ' , $ this ->guideline ('enforce-tests.md ' ));
151151 }
152152
153- return $ composed ->whereNotNull ()->map (fn ($ content , $ key ) => "# {$ key }\n{$ content }\n" )
153+ return $ composed ->whereNotNull ()->map (fn ($ content , $ key ) => "# {$ key }\n{$ content }\n" )
154154 ->join ("\n\n==== \n\n" );
155155 }
156156
157157 protected function guidelines (string $ dirPath , array $ replacements = []): ?string
158158 {
159- $ dirPath = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ dirPath );
159+ $ dirPath = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ dirPath );
160160 try {
161161 $ finder = Finder::create ()
162162 ->files ()
@@ -176,11 +176,11 @@ protected function guidelines(string $dirPath, array $replacements = []): ?strin
176176
177177 protected function guideline (string $ path , array $ replacements = []): ?string
178178 {
179- if (!file_exists ($ path )) {
180- $ path = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ path );
179+ if (! file_exists ($ path )) {
180+ $ path = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ path );
181181 }
182182
183- if (!file_exists ($ path )) {
183+ if (! file_exists ($ path )) {
184184 return null ;
185185 }
186186
@@ -258,7 +258,7 @@ protected function discoverTools(): array
258258 ->name ('*.php ' );
259259
260260 foreach ($ finder as $ toolFile ) {
261- $ fqdn = 'Laravel \\Boost \\Mcp \\Tools \\' . $ toolFile ->getBasename ('.php ' );
261+ $ fqdn = 'Laravel \\Boost \\Mcp \\Tools \\' . $ toolFile ->getBasename ('.php ' );
262262 if (class_exists ($ fqdn )) {
263263 $ tools [$ fqdn ] = Str::headline ($ toolFile ->getBasename ('.php ' ));
264264 }
@@ -272,7 +272,7 @@ protected function discoverTools(): array
272272 public function getHomePath (): string
273273 {
274274 if (PHP_OS_FAMILY === 'Windows ' ) {
275- if (!isset ($ _SERVER ['HOME ' ])) {
275+ if (! isset ($ _SERVER ['HOME ' ])) {
276276 $ _SERVER ['HOME ' ] = $ _SERVER ['USERPROFILE ' ];
277277 }
278278
@@ -286,22 +286,22 @@ protected function isHerdInstalled(): bool
286286 {
287287 $ isWindows = PHP_OS_FAMILY === 'Windows ' ;
288288
289- if (!$ isWindows ) {
289+ if (! $ isWindows ) {
290290 return file_exists ('/Applications/Herd.app/Contents/MacOS/Herd ' );
291291 }
292292
293- return is_dir ($ this ->getHomePath () . '/.config/herd ' );
293+ return is_dir ($ this ->getHomePath (). '/.config/herd ' );
294294 }
295295
296296 protected function isHerdMCPAvailable (): bool
297297 {
298298 $ isWindows = PHP_OS_FAMILY === 'Windows ' ;
299299
300300 if ($ isWindows ) {
301- return file_exists ($ this ->getHomePath () . '/.config/herd/bin/herd-mcp.phar ' );
301+ return file_exists ($ this ->getHomePath (). '/.config/herd/bin/herd-mcp.phar ' );
302302 }
303303
304- return file_exists ($ this ->getHomePath () . '/Library/Application Support/Herd/bin/herd-mcp.phar ' );
304+ return file_exists ($ this ->getHomePath (). '/Library/Application Support/Herd/bin/herd-mcp.phar ' );
305305 }
306306
307307 /*
@@ -328,7 +328,7 @@ private function intro()
328328HEADER
329329 );
330330 intro ('✦ Laravel Boost :: Install :: We Must Ship ✦ ' );
331- $ this ->line (' Let \'s give ' . $ this ->colors ->bgYellow ($ this ->colors ->black ($ this ->projectName )) . ' a Boost ' );
331+ $ this ->line (' Let \'s give ' . $ this ->colors ->bgYellow ($ this ->colors ->black ($ this ->projectName )) . ' a Boost ' );
332332 }
333333
334334 protected function projectPurpose (): string
@@ -349,17 +349,17 @@ protected function projectPurpose(): string
349349 protected function shouldEnforceTests (bool $ ask = true ): bool
350350 {
351351 $ enforce = Finder::create ()
352- ->in (base_path ('tests ' ))
353- ->files ()
354- ->name ('*.php ' )
355- ->count () > 6 ;
352+ ->in (base_path ('tests ' ))
353+ ->files ()
354+ ->name ('*.php ' )
355+ ->count () > 6 ;
356356
357357 if ($ enforce === false && $ ask === true ) {
358358 $ enforce = select (
359- label: 'Should AI always create tests? ' ,
360- options: ['Yes ' , 'No ' ],
361- default: 'Yes '
362- ) === 'Yes ' ;
359+ label: 'Should AI always create tests? ' ,
360+ options: ['Yes ' , 'No ' ],
361+ default: 'Yes '
362+ ) === 'Yes ' ;
363363 }
364364
365365 return $ enforce ;
@@ -377,7 +377,7 @@ protected function idesToInstallTo(): array
377377 ];
378378
379379 // Tell API which ones?
380- $ autoDetectedIdesString = Arr::join (array_map (fn (string $ ideKey ) => $ ideOptions [$ ideKey ] ?? '' , $ this ->detectedProjectIdes ), ', ' , ' & ' );
380+ $ autoDetectedIdesString = Arr::join (array_map (fn (string $ ideKey ) => $ ideOptions [$ ideKey ] ?? '' , $ this ->detectedProjectIdes ), ', ' , ' & ' );
381381
382382 return multiselect (
383383 label: sprintf ('Which IDEs do you use in %s? (space to select) ' , $ this ->projectName ),
@@ -433,7 +433,7 @@ protected function detectProjectAgents(): array
433433 protected function agentsToInstallTo (): Collection
434434 {
435435 $ agents = [];
436- if (!$ this ->installingGuidelines ()) {
436+ if (! $ this ->installingGuidelines ()) {
437437 return collect ();
438438 }
439439
@@ -445,7 +445,7 @@ protected function agentsToInstallTo(): Collection
445445 ->name ('*.php ' );
446446
447447 foreach ($ finder as $ agentFile ) {
448- $ className = 'Laravel \\Boost \\Install \\Agents \\' . $ agentFile ->getBasename ('.php ' );
448+ $ className = 'Laravel \\Boost \\Install \\Agents \\' . $ agentFile ->getBasename ('.php ' );
449449
450450 if (class_exists ($ className )) {
451451 $ reflection = new \ReflectionClass ($ className );
@@ -461,21 +461,22 @@ protected function agentsToInstallTo(): Collection
461461 $ selectedAgentClasses = collect (multiselect (
462462 label: sprintf ('Which agents need AI guidelines for %s? ' , $ this ->projectName ),
463463 options: $ agents ,
464- default: ['Laravel \\Boost \\Install \\Agents \\ClaudeCode ' ],//array_keys($agents),
464+ default: ['Laravel \\Boost \\Install \\Agents \\ClaudeCode ' ],// array_keys($agents),
465465 scroll: 4 , // TODO: use detection to auto-select
466466 ));
467467
468- return $ selectedAgentClasses ->map (fn ($ agentClass ) => new $ agentClass() );
468+ return $ selectedAgentClasses ->map (fn ($ agentClass ) => new $ agentClass );
469469 }
470470
471471 protected function enactGuidelines (string $ composedAiGuidelines ): void
472472 {
473- if (!$ this ->installingGuidelines ()) {
473+ if (! $ this ->installingGuidelines ()) {
474474 return ;
475475 }
476476
477477 if ($ this ->agentsToInstallTo ->isEmpty ()) {
478478 $ this ->info ('No agents selected for guideline installation. ' );
479+
479480 return ;
480481 }
481482
0 commit comments