Completed
Push — master ( d67629...d94fe1 )
by Changwan
03:26
created

PingCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace Wandu\Event\Commands;
3
4
use Wandu\Console\Command;
5
use Wandu\Event\Events\Ping;
6
use function Wandu\Event\trigger;
7
8
class PingCommand extends Command
9
{
10
    /** @var string */
11
    protected $description = "Queue a \"Ping\" event for testing";
12
13
    function execute()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
14
    {
15
        $this->output->writeln("Send Ping Event..");
16
        trigger(new Ping("Ping..."));
17
    }
18
}
19