ScheduleSummary   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 36
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A fire() 0 4 1
1
<?php namespace Indatus\Dispatcher\Commands;
2
3
/**
4
 * This file is part of Dispatcher
5
 *
6
 * (c) Ben Kuhl <[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
use Illuminate\Console\Command;
13
use Indatus\Dispatcher\Services\ScheduleService;
14
15
/**
16
 * View a summary for all scheduled artisan commands
17
 * @author Ben Kuhl <[email protected]>
18
 * @package Indatus\Dispatcher\Commands
19
 */
20
class ScheduleSummary extends Command
21
{
22
    /** @var \Indatus\Dispatcher\Services\ScheduleService|null  */
23
    private $scheduleService = null;
24
25 3
    public function __construct(ScheduleService $scheduleService)
26
    {
27 3
        parent::__construct();
28
29 3
        $this->scheduleService = $scheduleService;
30 3
    }
31
32
    /**
33
     * The console command name.
34
     *
35
     * @var string
36
     */
37
    protected $name = 'scheduled:summary';
38
39
    /**
40
     * The console command description.
41
     *
42
     * @var string
43
     */
44
    protected $description = 'View a summary of all scheduled artisan commands';
45
46
    /**
47
     * Execute the console command.
48
     *
49
     * @return mixed
50
     */
51 1
    public function fire()
52
    {
53 1
        $this->scheduleService->printSummary();
54 1
    }
55
}
56