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

CommandWasCreated   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 25
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __construct() 0 4 1
A getCommand() 0 3 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
}