Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mozex committed Jul 1, 2023
1 parent 09526cb commit 56a1cb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Commands/Concerns/FindsSearchableModels.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public function getSearchableModels(): Collection
{
return collect($this->getSpecifiedFiles())
->keys()
->map(fn (string $path) => $this->makeNamespaceFromPath($path))
->filter(fn (string $namespace) => $this->isSearchableModel($namespace))
->map($this->makeNamespaceFromPath(...))
->filter($this->isSearchableModel(...))
->values();
}

Expand All @@ -42,7 +42,7 @@ protected function makeNamespaceFromPath(string $path): string
->replace(['/', '.php'], ['\\', ''])
->explode('\\')
->map(fn (string $dir) => ucfirst($dir))
->prepend(config('scout-bulk-actions.namespace', ''))
->prepend(config('scout-bulk-actions.namespace'))
->filter()
->implode('\\');
}
Expand Down

0 comments on commit 56a1cb8

Please sign in to comment.