From 2f6c44ef6e23c8335ea4a7d03ac97e11720133de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Drunen?= Date: Sun, 24 Dec 2023 22:18:54 +0100 Subject: [PATCH] Ignore schedule function of kernel in code coverage --- app/Console/Kernel.php | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 74092695..92662a38 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,21 +13,9 @@ class Kernel extends ConsoleKernel { /** - * The Artisan commands provided by your application. - * - * @var array + * @codeCoverageIgnore */ - protected $commands = [ - // - ]; - - /** - * Define the application's command schedule. - * - * @param \Illuminate\Console\Scheduling\Schedule $schedule - * @return void - */ - protected function schedule(Schedule $schedule) + protected function schedule(Schedule $schedule): void { $schedule->job(new SyncStripeSubscriptions())->everyMinute()->when(function () { return Helper::arePlansEnabled(); @@ -40,12 +28,7 @@ protected function schedule(Schedule $schedule) $schedule->job(new SendWeeklyReports())->weekly()->fridays()->at('21:00'); } - /** - * Register the Closure based commands for the application. - * - * @return void - */ - protected function commands() + protected function commands(): void { $this->load(__DIR__ . '/Commands');