Passed
Pull Request — stable (#242)
by Sven
03:36
created

Command::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * This file is part of Laravel Zero.
5
 *
6
 * (c) Nuno Maduro <[email protected]>
7
 *
8
 *  For the full copyright and license information, please view the LICENSE
9
 *  file that was distributed with this source code.
10
 */
11
12
namespace LaravelZero\Framework\Commands;
13
14
use LogicException;
15
use Illuminate\Console\Scheduling\Schedule;
16
use Illuminate\Console\Command as BaseCommand;
17
18
/**
19
 * This is the Laravel Zero Framework Abstract Command Implementation.
20
 */
21
abstract class Command extends BaseCommand
22
{
23
    /**
24
     * Holds an instance of the app, if any.
25
     *
26
     * @var \Illuminate\Contracts\Foundation\Application|null
27
     */
28
    protected $app;
29
30
    /**
31
     * Execute the console command.
32
     *
33
     * @return void
34
     */
35
    public function handle(): void
36
    {
37
        throw new LogicException('You must override the handle() method in the concrete command class.');
38
    }
39
40
    /**
41
     * Define the command's schedule.
42
     *
43
     * @param  \Illuminate\Console\Scheduling\Schedule $schedule
44
     *
45
     * @return void
46
     */
47 20
    public function schedule(Schedule $schedule): void
0 ignored issues
show
Unused Code introduced by
The parameter $schedule is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
48
    {
49 20
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54 20
    public function setLaravel($laravel)
55
    {
56 20
        parent::setLaravel($this->app = $laravel);
57 20
    }
58
}
59