File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ protected function possibleModels()
249
249
{
250
250
$ modelPath = is_dir (app_path ('Models ' )) ? app_path ('Models ' ) : app_path ();
251
251
252
- return collect (( new Finder )->files ()->depth (0 )->in ($ modelPath ))
252
+ return collect (Finder:: create ( )->files ()->depth (0 )->in ($ modelPath ))
253
253
->map (fn ($ file ) => $ file ->getBasename ('.php ' ))
254
254
->sort ()
255
255
->values ()
@@ -269,7 +269,7 @@ protected function possibleEvents()
269
269
return [];
270
270
}
271
271
272
- return collect (( new Finder )->files ()->depth (0 )->in ($ eventPath ))
272
+ return collect (Finder:: create ( )->files ()->depth (0 )->in ($ eventPath ))
273
273
->map (fn ($ file ) => $ file ->getBasename ('.php ' ))
274
274
->sort ()
275
275
->values ()
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ protected function models()
126
126
throw new InvalidArgumentException ('The --models and --except options cannot be combined. ' );
127
127
}
128
128
129
- return collect (( new Finder )->in ($ this ->getPath ())->files ()->name ('*.php ' ))
129
+ return collect (Finder:: create ( )->in ($ this ->getPath ())->files ()->name ('*.php ' ))
130
130
->map (function ($ model ) {
131
131
$ namespace = $ this ->laravel ->getNamespace ();
132
132
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ protected function load($paths)
340
340
341
341
$ namespace = $ this ->app ->getNamespace ();
342
342
343
- foreach (( new Finder )->in ($ paths )->files () as $ file ) {
343
+ foreach (Finder:: create ( )->in ($ paths )->files () as $ file ) {
344
344
$ command = $ this ->commandClassFromFile ($ file , $ namespace );
345
345
346
346
if (is_subclass_of ($ command , Command::class) &&
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class DiscoverEvents
29
29
public static function within ($ listenerPath , $ basePath )
30
30
{
31
31
$ listeners = collect (static ::getListenerEvents (
32
- ( new Finder )->files ()->in ($ listenerPath ), $ basePath
32
+ Finder:: create ( )->files ()->in ($ listenerPath ), $ basePath
33
33
));
34
34
35
35
$ discoveredEvents = [];
You can’t perform that action at this time.
0 commit comments