1 | <?php |
||
5 | class PreCommitResponse |
||
6 | { |
||
7 | /** |
||
8 | * @var bool |
||
9 | */ |
||
10 | private $preCommit; |
||
11 | /** |
||
12 | * @var bool |
||
13 | */ |
||
14 | private $rightMessage; |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $errorMessage; |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $composer; |
||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | private $jsonLint; |
||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $phpLint; |
||
31 | /** |
||
32 | * @var PhpMdResponse |
||
33 | */ |
||
34 | private $phpMd; |
||
35 | /** |
||
36 | * @var PhpCsResponse |
||
37 | */ |
||
38 | private $phpCs; |
||
39 | /** |
||
40 | * @var PhpCsFixerResponse |
||
41 | */ |
||
42 | private $phpCsFixer; |
||
43 | /** |
||
44 | * @var PhpUnitResponse |
||
45 | */ |
||
46 | private $phpUnit; |
||
47 | /** |
||
48 | * @var PhpUnitStrictCoverageResponse |
||
49 | */ |
||
50 | private $phpUnitStrictCoverage; |
||
51 | |||
52 | /** |
||
53 | * PreCommitResponse constructor. |
||
54 | * |
||
55 | * @param bool $preCommit |
||
56 | * @param string $rightMessage |
||
57 | * @param string $errorMessage |
||
58 | * @param bool $composer |
||
59 | * @param bool $jsonLint |
||
60 | * @param bool $phpLint |
||
61 | * @param PhpMdResponse $phpMd |
||
62 | * @param PhpCsResponse $phpCs |
||
63 | * @param PhpCsFixerResponse $phpCsFixer |
||
64 | * @param PhpUnitResponse $phpUnit |
||
65 | * @param PhpUnitStrictCoverageResponse $phpUnitStrictCoverage |
||
66 | */ |
||
67 | 10 | public function __construct( |
|
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | 2 | public function isPreCommit() |
|
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | 2 | public function getRightMessage() |
|
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | 5 | public function getErrorMessage() |
|
116 | |||
117 | /** |
||
118 | * @return bool |
||
119 | */ |
||
120 | 2 | public function isComposer() |
|
124 | |||
125 | /** |
||
126 | * @return bool |
||
127 | */ |
||
128 | 2 | public function isJsonLint() |
|
132 | |||
133 | /** |
||
134 | * @return bool |
||
135 | */ |
||
136 | 2 | public function isPhpLint() |
|
140 | |||
141 | /** |
||
142 | * @return PhpMdResponse |
||
143 | */ |
||
144 | 2 | public function getPhpMd() |
|
148 | |||
149 | /** |
||
150 | * @return PhpCsResponse |
||
151 | */ |
||
152 | 2 | public function getPhpCs() |
|
156 | |||
157 | /** |
||
158 | * @return PhpCsFixerResponse |
||
159 | */ |
||
160 | 5 | public function getPhpCsFixer() |
|
164 | |||
165 | /** |
||
166 | * @return PhpUnitResponse |
||
167 | */ |
||
168 | 2 | public function getPhpUnit() |
|
172 | |||
173 | /** |
||
174 | * @return PhpUnitStrictCoverageResponse |
||
175 | */ |
||
176 | 1 | public function getPhpUnitStrictCoverage() |
|
180 | } |
||
181 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.