Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to authored and github-actions[bot] committed Jan 5, 2025
1 parent ff9c95c commit d795960
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Laravel/src/Commands/MoonShineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,19 @@ protected function qualifyStubsDir(StubsPath $stubsPath, string $dir, ?string $n
$baseDir = $this->hasOption('base-dir') ? $this->option('base-dir') : null;
$baseNamespace = $this->hasOption('base-namespace') ? $this->option('base-namespace') : null;

$toNamespace = static fn(string $str): string => str($str)
$toNamespace = static fn (string $str): string => str($str)
->trim('\\')
->trim('/')
->replace('/', '\\')
->explode('\\')
->map(static fn(string $segment): string => ucfirst($segment))
->map(static fn (string $segment): string => ucfirst($segment))
->implode('\\');

if($baseDir !== null && $baseNamespace === null) {
if ($baseDir !== null && $baseNamespace === null) {
$baseNamespace = $toNamespace($baseDir);
}

if($namespace === null) {
if ($namespace === null) {
$namespace = $toNamespace($dir);
}

Expand Down

0 comments on commit d795960

Please sign in to comment.