ConsoleKernel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 36
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A commands() 0 3 1
A schedule() 0 4 1
1
<?php
2
3
namespace Foundation\Kernels;
4
5
use Foundation\Console\BootstrapCacheCommand;
6
use Foundation\Console\BootstrapClearCacheCommand;
7
use Foundation\Console\ClearModelsCacheCommand;
8
use Foundation\Console\DatabaseResetCommand;
9
use Foundation\Console\DisplayEnvCommand;
10
use Illuminate\Console\Scheduling\Schedule;
11
use Illuminate\Foundation\Console\Kernel as LaravelConsoleKernel;
12
use Modules\Demo\Jobs\AlterDemoDataJob;
13
14
class ConsoleKernel extends LaravelConsoleKernel
15
{
16
    /**
17
     * The Artisan commands provided by your application.
18
     *
19
     * @var array
20
     */
21
    protected $commands = [
22
        BootstrapCacheCommand::class,
23
        BootstrapClearCacheCommand::class,
24
        DatabaseResetCommand::class,
25
        ClearModelsCacheCommand::class,
26
        DisplayEnvCommand::class,
27
    ];
28
29
    /**
30
     * Define the application's command schedule.
31
     *
32
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
33
     *
34
     * @return void
35
     */
36 43
    protected function schedule(Schedule $schedule)
37
    {
38 43
        $schedule->command('horizon:snapshot')->everyFiveMinutes();
39 43
        $schedule->job(new AlterDemoDataJob())->everyMinute();
40 43
    }
41
42
    /**
43
     * Register the commands for the application.
44
     *
45
     * @return void
46
     */
47 43
    protected function commands()
48
    {
49 43
        require base_path('src/Foundation/Routes/console.php');
50 43
    }
51
}
52