Completed
Push — develop ( a645d1...8e4b46 )
by Tom
09:48
created

Event   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 81
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 81
rs 10
c 1
b 0
f 0
wmc 6
lcom 0
cbo 1

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getInput() 0 4 1
A getOutput() 0 4 1
A getApplication() 0 4 1
A setDispatcher() 0 4 1
A getDispatcher() 0 4 1
1
<?php
2
3
namespace N98\Magento\Application\Console;
4
5
use N98\Magento\Application;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
use Symfony\Component\EventDispatcher\Event as BaseEvent;
9
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
10
11
class Event extends BaseEvent
12
{
13
    /**
14
     * @var Application
15
     */
16
    protected $application;
17
18
    /**
19
     * @var InputInterface
20
     */
21
    protected $input;
22
23
    /**
24
     * @var OutputInterface
25
     */
26
    protected $output;
27
28
    /**
29
     * @var EventDispatcherInterface Dispatcher that dispatched this event
30
     */
31
    private $dispatcher;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
32
33
    public function __construct(Application $application, InputInterface $input, OutputInterface $output)
34
    {
35
        $this->application = $application;
36
        $this->input = $input;
37
        $this->output = $output;
38
    }
39
40
    /**
41
     * Gets the input instance.
42
     *
43
     * @return InputInterface An InputInterface instance
44
     */
45
    public function getInput()
46
    {
47
        return $this->input;
48
    }
49
50
    /**
51
     * Gets the output instance.
52
     *
53
     * @return OutputInterface An OutputInterface instance
54
     */
55
    public function getOutput()
56
    {
57
        return $this->output;
58
    }
59
60
    /**
61
     * @return Application
62
     */
63
    public function getApplication()
64
    {
65
        return $this->application;
66
    }
67
68
    /**
69
     * Stores the EventDispatcher that dispatches this Event.
70
     *
71
     * @param EventDispatcherInterface $dispatcher
72
     *
73
     * @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call.
74
     */
75
    public function setDispatcher(EventDispatcherInterface $dispatcher)
76
    {
77
        $this->dispatcher = $dispatcher;
78
    }
79
80
    /**
81
     * Returns the EventDispatcher that dispatches this Event.
82
     *
83
     * @return EventDispatcherInterface
84
     *
85
     * @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call.
86
     */
87
    public function getDispatcher()
88
    {
89
        return $this->dispatcher;
90
    }
91
}
92