@@ -55,7 +55,8 @@ public function handle(Roster $roster): void
5555 {
5656 $ this ->agentsToInstallTo = collect ();
5757 $ this ->roster = $ roster ;
58- $ this ->colors = new class {
58+ $ this ->colors = new class
59+ {
5960 use Colors;
6061 };
6162
@@ -95,7 +96,7 @@ protected function enact()
9596 if ($ this ->installingGuidelines ()) {
9697 $ this ->enactGuidelines ($ composedAiGuidelines );
9798 }
98- // $this->enactMcp();
99+ // $this->enactMcp();
99100
100101 if (in_array ('other ' , $ this ->idesToInstallTo )) {
101102 $ this ->newLine ();
@@ -126,13 +127,14 @@ protected function compose(): string
126127 if ($ this ->shouldEnforceTests ()) {
127128 $ composed ->put ('tests ' , $ this ->guideline ('enforce-tests.md ' ));
128129 }
129- return $ composed ->map (fn ($ content , $ key ) => "# {$ key }\n{$ content }\n" )
130+
131+ return $ composed ->map (fn ($ content , $ key ) => "# {$ key }\n{$ content }\n" )
130132 ->join ("\n\n==== \n\n" );
131133 }
132134
133135 protected function guidelines (string $ dirPath , array $ replacements = []): string
134136 {
135- $ dirPath = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ dirPath );
137+ $ dirPath = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ dirPath );
136138 $ finder = Finder::create ()
137139 ->files ()
138140 ->in ($ dirPath )
@@ -148,11 +150,11 @@ protected function guidelines(string $dirPath, array $replacements = []): string
148150
149151 protected function guideline (string $ path , array $ replacements = []): string
150152 {
151- if (!file_exists ($ path )) {
152- $ path = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ path );
153+ if (! file_exists ($ path )) {
154+ $ path = str_replace ('/ ' , DIRECTORY_SEPARATOR , __DIR__ . '/../../.ai/ ' . $ path );
153155 }
154156
155- if (!file_exists ($ path )) {
157+ if (! file_exists ($ path )) {
156158 throw new \Exception ("$ path does not exist " );
157159 }
158160
@@ -230,7 +232,7 @@ protected function discoverTools(): array
230232 ->name ('*.php ' );
231233
232234 foreach ($ finder as $ toolFile ) {
233- $ fqdn = 'Laravel \\Boost \\Mcp \\Tools \\' . $ toolFile ->getBasename ('.php ' );
235+ $ fqdn = 'Laravel \\Boost \\Mcp \\Tools \\' . $ toolFile ->getBasename ('.php ' );
234236 if (class_exists ($ fqdn )) {
235237 $ tools [$ fqdn ] = Str::headline ($ toolFile ->getBasename ('.php ' ));
236238 }
@@ -244,7 +246,7 @@ protected function discoverTools(): array
244246 public function getHomePath (): string
245247 {
246248 if (PHP_OS_FAMILY === 'Windows ' ) {
247- if (!isset ($ _SERVER ['HOME ' ])) {
249+ if (! isset ($ _SERVER ['HOME ' ])) {
248250 $ _SERVER ['HOME ' ] = $ _SERVER ['USERPROFILE ' ];
249251 }
250252
@@ -258,22 +260,22 @@ protected function isHerdInstalled(): bool
258260 {
259261 $ isWindows = PHP_OS_FAMILY === 'Windows ' ;
260262
261- if (!$ isWindows ) {
263+ if (! $ isWindows ) {
262264 return file_exists ('/Applications/Herd.app/Contents/MacOS/Herd ' );
263265 }
264266
265- return is_dir ($ this ->getHomePath () . '/.config/herd ' );
267+ return is_dir ($ this ->getHomePath (). '/.config/herd ' );
266268 }
267269
268270 protected function isHerdMCPAvailable (): bool
269271 {
270272 $ isWindows = PHP_OS_FAMILY === 'Windows ' ;
271273
272274 if ($ isWindows ) {
273- return file_exists ($ this ->getHomePath () . '/.config/herd/bin/herd-mcp.phar ' );
275+ return file_exists ($ this ->getHomePath (). '/.config/herd/bin/herd-mcp.phar ' );
274276 }
275277
276- return file_exists ($ this ->getHomePath () . '/Library/Application Support/Herd/bin/herd-mcp.phar ' );
278+ return file_exists ($ this ->getHomePath (). '/Library/Application Support/Herd/bin/herd-mcp.phar ' );
277279 }
278280
279281 /*
@@ -300,7 +302,7 @@ private function intro()
300302HEADER
301303 );
302304 intro ('✦ Laravel Boost :: Install :: We Must Ship ✦ ' );
303- $ this ->line (' Let \'s setup Laravel Boost in your IDEs for ' . $ this ->colors ->bgYellow ($ this ->colors ->black ($ this ->projectName )));
305+ $ this ->line (' Let \'s setup Laravel Boost in your IDEs for ' . $ this ->colors ->bgYellow ($ this ->colors ->black ($ this ->projectName )));
304306 }
305307
306308 protected function projectPurpose (): string
@@ -321,17 +323,17 @@ protected function projectPurpose(): string
321323 protected function shouldEnforceTests (bool $ ask = true ): bool
322324 {
323325 $ enforce = Finder::create ()
324- ->in (base_path ('tests ' ))
325- ->files ()
326- ->name ('*.php ' )
327- ->count () > 6 ;
326+ ->in (base_path ('tests ' ))
327+ ->files ()
328+ ->name ('*.php ' )
329+ ->count () > 6 ;
328330
329331 if ($ enforce === false && $ ask === true ) {
330332 $ enforce = select (
331- label: 'Should AI always create tests? ' ,
332- options: ['Yes ' , 'No ' ],
333- default: 'Yes '
334- ) === 'Yes ' ;
333+ label: 'Should AI always create tests? ' ,
334+ options: ['Yes ' , 'No ' ],
335+ default: 'Yes '
336+ ) === 'Yes ' ;
335337 }
336338
337339 return $ enforce ;
@@ -349,7 +351,7 @@ protected function idesToInstallTo(): array
349351 ];
350352
351353 // Tell API which ones?
352- $ autoDetectedIdesString = Arr::join (array_map (fn (string $ ideKey ) => $ ideOptions [$ ideKey ] ?? '' , $ this ->detectedProjectIdes ), ', ' , ' & ' );
354+ $ autoDetectedIdesString = Arr::join (array_map (fn (string $ ideKey ) => $ ideOptions [$ ideKey ] ?? '' , $ this ->detectedProjectIdes ), ', ' , ' & ' );
353355
354356 return multiselect (
355357 label: sprintf ('Which IDEs do you use in %s? (space to select) ' , $ this ->projectName ),
@@ -405,7 +407,7 @@ protected function detectProjectAgents(): array
405407 protected function agentsToInstallTo (): Collection
406408 {
407409 $ agents = [];
408- if (!$ this ->installingGuidelines ()) {
410+ if (! $ this ->installingGuidelines ()) {
409411 return collect ();
410412 }
411413
@@ -417,7 +419,7 @@ protected function agentsToInstallTo(): Collection
417419 ->name ('*.php ' );
418420
419421 foreach ($ finder as $ agentFile ) {
420- $ className = 'Laravel \\Boost \\Install \\Agents \\' . $ agentFile ->getBasename ('.php ' );
422+ $ className = 'Laravel \\Boost \\Install \\Agents \\' . $ agentFile ->getBasename ('.php ' );
421423
422424 if (class_exists ($ className )) {
423425 $ reflection = new \ReflectionClass ($ className );
@@ -433,21 +435,22 @@ protected function agentsToInstallTo(): Collection
433435 $ selectedAgentClasses = collect (multiselect (
434436 label: 'Which agents need AI guidelines? ' ,
435437 options: $ agents ,
436- default: ['Laravel \\Boost \\Install \\Agents \\ClaudeCode ' ],//array_keys($agents),
438+ default: ['Laravel \\Boost \\Install \\Agents \\ClaudeCode ' ],// array_keys($agents),
437439 scroll: 4 , // TODO: use detection to auto-select
438440 ));
439441
440- return $ selectedAgentClasses ->map (fn ($ agentClass ) => new $ agentClass() );
442+ return $ selectedAgentClasses ->map (fn ($ agentClass ) => new $ agentClass );
441443 }
442444
443445 protected function enactGuidelines (string $ composedAiGuidelines ): void
444446 {
445- if (!$ this ->installingGuidelines ()) {
447+ if (! $ this ->installingGuidelines ()) {
446448 return ;
447449 }
448450
449451 if ($ this ->agentsToInstallTo ->isEmpty ()) {
450452 $ this ->info ('No agents selected for guideline installation. ' );
453+
451454 return ;
452455 }
453456
0 commit comments