CommandReceived::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace League\Tactician\CommandEvents\Event;
4
5
use League\Event\Event;
6
7
/**
8
 * Emitted when a command is received
9
 */
10
final class CommandReceived extends Event implements CommandEvent
11
{
12
    use HasCommand;
13
14
    /**
15
     * @param object $command
16
     */
17 8
    public function __construct($command)
18
    {
19 8
        $this->command = $command;
20
21 8
        parent::__construct('command.received');
22 8
    }
23
}
24