CommandEvent   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 65
ccs 0
cts 28
cp 0
rs 10
wmc 6
lcom 0
cbo 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getCommand() 0 4 1
A getInput() 0 4 1
A getOutput() 0 4 1
A getException() 0 4 1
A getExitCode() 0 4 1
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Console;
9
10
use Symfony\Component\Console\Command\Command;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
14
class CommandEvent
15
{
16
    private $command;
17
    private $input;
18
    private $output;
19
    private $exception;
20
    private $exitCode;
21
22
    /**
23
     * CommandEvent constructor.
24
     * @param Command $command
25
     * @param InputInterface $input
26
     * @param OutputInterface $output
27
     * @param null|\Throwable $exception
28
     * @param int $exitCode
29
     */
30
    public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exception = null, $exitCode = 0)
31
    {
32
        $this->command = $command;
33
        $this->input = $input;
34
        $this->output = $output;
35
        $this->exception = $exception;
36
        $this->exitCode = $exitCode;
37
    }
38
39
    /**
40
     * @return Command
41
     */
42
    public function getCommand()
43
    {
44
        return $this->command;
45
    }
46
47
    /**
48
     * @return InputInterface
49
     */
50
    public function getInput()
51
    {
52
        return $this->input;
53
    }
54
55
    /**
56
     * @return OutputInterface
57
     */
58
    public function getOutput()
59
    {
60
        return $this->output;
61
    }
62
63
    /**
64
     * @return \Throwable
65
     */
66
    public function getException()
67
    {
68
        return $this->exception;
69
    }
70
71
    /**
72
     * @return mixed
73
     */
74
    public function getExitCode()
75
    {
76
        return $this->exitCode;
77
    }
78
}
79