Kernel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A commands() 0 5 1
A schedule() 0 7 1
1
<?php
2
3
namespace App\Console;
4
5
use App\Console\Commands\DailyScan;
6
use App\Console\Commands\RestockCredits;
7
use App\Console\Commands\ScannerTimeout;
8
use Illuminate\Console\Scheduling\Schedule;
9
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
10
11
class Kernel extends ConsoleKernel
12
{
13
    /**
14
     * The Artisan commands provided by your application.
15
     *
16
     * @var array
17
     */
18
    protected $commands = [
19
        //
20
    ];
21
22
    /**
23
     * Define the application's command schedule.
24
     *
25
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
26
     *
27
     * @return void
28
     */
29
    protected function schedule(Schedule $schedule)
30
    {
31
        // $schedule->command('inspire')
32
        //          ->hourly();
33
        $schedule->command(DailyScan::class)->withoutOverlapping()->everyMinute()->sendOutputTo('scanResult.log', true);
34
        $schedule->command(ScannerTimeout::class)->everyMinute();
35
        $schedule->command(RestockCredits::class)->dailyAt('00:00');
36
    }
37
38
    /**
39
     * Register the commands for the application.
40
     *
41
     * @return void
42
     */
43
    protected function commands()
44
    {
45
        $this->load(__DIR__.'/Commands');
46
47
        require base_path('routes/console.php');
48
    }
49
}
50