Kernel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 43
ccs 4
cts 6
cp 0.6667
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A commands() 0 5 1
A schedule() 0 14 1
1
<?php
2
3
namespace App\Console;
4
5
use App\Console\Commands\SendEmailsExpiringRepetitiveEvents;
6
use Illuminate\Console\Scheduling\Schedule;
7
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
8
9
class Kernel extends ConsoleKernel
10
{
11
    /**
12
     * The Artisan commands provided by your application.
13
     *
14
     * @var array
15
     */
16
    protected $commands = [
17
        //
18
    ];
19
20
    /**
21
     * Define the application's command schedule.
22
     *
23
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
24
     * @return void
25
     */
26
    protected function schedule(Schedule $schedule)
27
    {
28
        $logPath = storage_path('logs/schedule.log');
29
30
        $schedule->command(SendEmailsExpiringRepetitiveEvents::class)
31
            ->daily()
32
            ->appendOutputTo($logPath)
33
            ->emailOutputTo(env('WEBMASTER_MAIL'));
34
35 118
        $schedule->command('sitemap:generate')->daily();
36
37 118
        // Backup
38
//        $schedule->command('backup:clean')->weekly()->sundays()->at('00:00');
39 118
        $schedule->command('backup:run')->weekly()->sundays()->at('00:30');
40 118
    }
41
42
    /**
43
     * Register the commands for the application.
44
     *
45
     * @return void
46
     */
47
    protected function commands()
48
    {
49
        $this->load(__DIR__.'/Commands');
50
51
        require base_path('routes/console.php');
52
    }
53
}
54