ConsoleKernel::commands()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 0
b 0
f 0
cc 1
ccs 2
cts 2
cp 1
crap 1
rs 10
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