CommandWasCreated   A
last analyzed

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 4
    public function __construct(Command $command)
24
    {
25
26 4
        $this->command = $command;
27 4
    }
28
29
    /**
30
     * @return Command
31
     */
32 2
    public function getCommand(): Command
33
    {
34 2
       return $this->command;
35
    }
36
37 2
    public function getName(): string
38
    {
39 2
        return self::NAME;
40
    }
41
}