Completed
Pull Request — master (#71)
by
unknown
02:56
created

PhpCsFixerToolCommand   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 109
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getFiles() 0 4 1
A isPsr0() 0 4 1
A isPsr1() 0 4 1
A isPsr2() 0 4 1
A isSymfony() 0 4 1
A getOptions() 0 4 1
A getErrorMessage() 0 4 1
1
<?php
2
3
namespace PhpGitHooks\Module\PhpCsFixer\Contract\Command;
4
5
use PhpGitHooks\Infrastructure\CommandBus\CommandBus\CommandInterface;
6
7
class PhpCsFixerToolCommand implements CommandInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    private $files;
13
    /**
14
     * @var bool
15
     */
16
    private $psr0;
17
    /**
18
     * @var bool
19
     */
20
    private $psr1;
21
    /**
22
     * @var bool
23
     */
24
    private $psr2;
25
    /**
26
     * @var bool
27
     */
28
    private $symfony;
29
    /**
30
     * @var string
31
     */
32
    private $options;
33
    /**
34
     * @var string
35
     */
36
    private $errorMessage;
37
38
    /**
39
     * PhpCsFixerToolCommand constructor.
40
     *
41
     * @param array  $files
42
     * @param bool   $psr0
43
     * @param bool   $psr1
44
     * @param bool   $psr2
45
     * @param bool   $symfony
46
     * @param string $options
47
     * @param string $errorMessage
48
     */
49 3
    public function __construct(array $files, $psr0, $psr1, $psr2, $symfony, $options, $errorMessage)
50
    {
51 3
        $this->files = $files;
52 3
        $this->psr0 = $psr0;
53 3
        $this->psr1 = $psr1;
54 3
        $this->psr2 = $psr2;
55 3
        $this->symfony = $symfony;
56 3
        $this->options = $options;
57 3
        $this->errorMessage = $errorMessage;
58 3
    }
59
60
    /**
61
     * @return array
62
     */
63 2
    public function getFiles()
64
    {
65 2
        return $this->files;
66
    }
67
68
    /**
69
     * @return bool
70
     */
71 2
    public function isPsr0()
72
    {
73 2
        return $this->psr0;
74
    }
75
76
    /**
77
     * @return bool
78
     */
79 2
    public function isPsr1()
80
    {
81 2
        return $this->psr1;
82
    }
83
84
    /**
85
     * @return bool
86
     */
87 2
    public function isPsr2()
88
    {
89 2
        return $this->psr2;
90
    }
91
92
    /**
93
     * @return bool
94
     */
95 2
    public function isSymfony()
96
    {
97 2
        return $this->symfony;
98
    }
99
100
    /**
101
     * @return string
102
     */
103 2
    public function getOptions()
104
    {
105 2
        return $this->options;
106
    }
107
108
    /**
109
     * @return string
110
     */
111 2
    public function getErrorMessage()
112
    {
113 2
        return $this->errorMessage;
114
    }
115
}
116