Passed
Push — master ( fa3bf1...2fa9b0 )
by
unknown
04:14
created

CommandWasCreated::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: thales
5
 * Date: 14/01/2019
6
 * Time: 19:49
7
 */
8
9
namespace Saci\Console\Infrastructure\Domain\Events;
10
11
12
use Saci\Console\Domain\Entity\Command;
13
use Symfony\Component\EventDispatcher\Event;
14
15
class CommandWasCreated extends Event implements \Saci\Console\Domain\Events\CommandWasCreated
16
{
17
18
    /**
19
     * @var Command
20
     */
21
    private $command;
22
23 3
    public function __construct(Command $command)
24
    {
25
26 3
        $this->command = $command;
27 3
    }
28
29
    /**
30
     * @return Command
31
     */
32 1
    public function getCommand(): Command
33
    {
34 1
       return $this->command;
35
    }
36
37 1
    public function getName(): string
38
    {
39 1
        return self::NAME;
40
    }
41
}