AbstractEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 36
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCommandName() 0 4 1
A getCommandInput() 0 4 1
1
<?php
2
3
namespace Innmind\ProvisionerBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Symfony\Component\Console\Input\InputInterface;
7
8
abstract class AbstractEvent extends Event
9
{
10
    protected $commandName;
11
    protected $input;
12
13
    /**
14
     * Construct an event for the given command
15
     * @param string $name Command name
16
     * @param InputInterface $input Command input
17
     */
18 33
    public function __construct($name, InputInterface $input)
19
    {
20 33
        $this->commandName = (string) $name;
21 33
        $this->input = $input;
22 33
    }
23
24
    /**
25
     * Return the command name
26
     *
27
     * @return string
28
     */
29 24
    public function getCommandName()
30
    {
31 24
        return $this->commandName;
32
    }
33
34
    /**
35
     * Return the command input
36
     *
37
     * @return InputInterface
38
     */
39 21
    public function getCommandInput()
40
    {
41 21
        return $this->input;
42
    }
43
}
44