Completed
Pull Request — master (#47)
by Şəhriyar
33:20
created

Kernel::commands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 0
cts 0
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 2
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 19
     *
24
     * @return void
25 19
     */
26 19
    protected function schedule(Schedule $schedule)
27 19
    {
28
//        $schedule->command('inspire')->hourly();
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
29
    }
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
        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
        });
48
    }
49
}