@@ -24,33 +24,33 @@ abstract class Processor
2424{
2525 use Artisan;
2626
27- abstract public function handle (): void ;
28-
2927 public function __construct (
30- protected Options $ options ,
31- protected InputInterface $ input ,
32- protected OutputStyle $ output ,
33- protected Config $ config ,
28+ protected Options $ options ,
29+ protected InputInterface $ input ,
30+ protected OutputStyle $ output ,
31+ protected Config $ config ,
3432 protected ActionRepository $ repository ,
35- protected Git $ git ,
36- protected File $ file ,
37- protected Migrator $ migrator ,
38- protected Notification $ notification ,
39- protected Dispatcher $ events ,
40- protected Sorter $ sorter
33+ protected Git $ git ,
34+ protected File $ file ,
35+ protected Migrator $ migrator ,
36+ protected Notification $ notification ,
37+ protected Dispatcher $ events ,
38+ protected Sorter $ sorter
4139 ) {
4240 $ this ->notification ->setOutput ($ this ->output , $ this ->options ->silent );
4341 $ this ->repository ->setConnection ($ this ->options ->connection );
4442 $ this ->migrator ->setConnection ($ this ->options ->connection )->setOutput ($ this ->output );
4543 }
4644
45+ abstract public function handle (): void ;
46+
4747 protected function getFiles (string $ path , ?Closure $ filter = null ): array
4848 {
4949 $ file = Str::finish ($ path , '.php ' );
5050
5151 $ files = $ this ->isFile ($ file ) ? [$ file ] : $ this ->file ->names ($ path , $ filter , true );
5252
53- $ files = Arr::filter ($ files , fn (string $ path ) => ! Str::contains ($ path , $ this ->config ->exclude ()));
53+ $ files = Arr::filter ($ files , fn (string $ path ) => Str:: endsWith ( $ path , ' .php ' ) && ! Str::contains ($ path , $ this ->config ->exclude ()));
5454
5555 return Arr::of ($ this ->sorter ->byValues ($ files ))
5656 ->map (fn (string $ value ) => Str::before ($ value , '.php ' ))
0 commit comments