Kernel::commands()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1.0156

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 3
cts 4
cp 0.75
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1.0156
1
<?php
2
namespace App\Console;
3
4
use Illuminate\Console\Scheduling\Schedule;
5
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
6
use Illuminate\Foundation\Inspiring;
7
8
class Kernel extends ConsoleKernel
9
{
10
    /**
11
     * The Artisan commands provided by your application.
12
     *
13
     * @var array
14
     */
15
    protected $commands = [
16
        //
17
    ];
18
19
    /**
20
     * Define the application's command schedule.
21
     *
22
     * @param  \Illuminate\Console\Scheduling\Schedule $schedule
23
     *
24
     * @return void
25
     */
26 19
    protected function schedule(Schedule $schedule)
27
    {
28
//        $schedule->command('inspire')->hourly();
29 19
    }
30
31
    /**
32
     * Register the Closure based commands for the application.
33
     *
34
     * @return void
35
     */
36
    protected function commands()
37
    {
38
        /*-------------------------------------------------------------------------
39
         | This is where you may define all of your Closure based console
40
         | commands. Each Closure is bound to a command instance allowing a
41
         | simple approach to interacting with each command's IO methods.
42
         *------------------------------------------------------------------------*/
43
44 4
        app(\Illuminate\Contracts\Console\Kernel::class)->command('inspire', function () {
45
            /** @var \Illuminate\Console\Command $this */
46
            $this->comment(Inspiring::quote());
0 ignored issues
show
Bug introduced by
The method comment() does not seem to exist on object<App\Console\Kernel>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
47 4
        });
48
    }
49
}