Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Illuminate/Console/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected function possibleModels()
{
$modelPath = is_dir(app_path('Models')) ? app_path('Models') : app_path();

return collect((new Finder)->files()->depth(0)->in($modelPath))
return collect(Finder::create()->files()->depth(0)->in($modelPath))
->map(fn ($file) => $file->getBasename('.php'))
->sort()
->values()
Expand All @@ -269,7 +269,7 @@ protected function possibleEvents()
return [];
}

return collect((new Finder)->files()->depth(0)->in($eventPath))
return collect(Finder::create()->files()->depth(0)->in($eventPath))
->map(fn ($file) => $file->getBasename('.php'))
->sort()
->values()
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Console/PruneCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected function models()
throw new InvalidArgumentException('The --models and --except options cannot be combined.');
}

return collect((new Finder)->in($this->getPath())->files()->name('*.php'))
return collect(Finder::create()->in($this->getPath())->files()->name('*.php'))
->map(function ($model) {
$namespace = $this->laravel->getNamespace();

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ protected function load($paths)

$namespace = $this->app->getNamespace();

foreach ((new Finder)->in($paths)->files() as $file) {
foreach (Finder::create()->in($paths)->files() as $file) {
$command = $this->commandClassFromFile($file, $namespace);

if (is_subclass_of($command, Command::class) &&
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Events/DiscoverEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DiscoverEvents
public static function within($listenerPath, $basePath)
{
$listeners = collect(static::getListenerEvents(
(new Finder)->files()->in($listenerPath), $basePath
Finder::create()->files()->in($listenerPath), $basePath
));

$discoveredEvents = [];
Expand Down