1 | <?php |
||
5 | abstract class TestFactory |
||
6 | { |
||
7 | /** |
||
8 | * @var TestData |
||
9 | */ |
||
10 | private $testData; |
||
11 | |||
12 | /** |
||
13 | * @var TestConfiguration|null |
||
14 | */ |
||
15 | private $configuration = null; |
||
16 | |||
17 | /** |
||
18 | * @var array<TestResult> |
||
19 | */ |
||
20 | private $testResult; |
||
21 | |||
22 | /** |
||
23 | * @var array|null |
||
24 | */ |
||
25 | private $output = array(); |
||
26 | |||
27 | /** |
||
28 | * @var State |
||
29 | */ |
||
30 | private $state = State::NOSTATE; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private $messages = array(); |
||
36 | |||
37 | |||
38 | /** |
||
39 | * @param TestConfiguration|null $configuration |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | protected function setConfiguration($configuration = null) |
||
50 | |||
51 | |||
52 | /** |
||
53 | * @return TestConfiguration |
||
54 | */ |
||
55 | public function getConfiguration() |
||
60 | |||
61 | |||
62 | /** |
||
63 | * @return TestData|null |
||
64 | */ |
||
65 | public function getTestData() |
||
70 | |||
71 | |||
72 | /** |
||
73 | * @param TestData|null $testData |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | protected function setTestData($testData = null) |
||
84 | |||
85 | |||
86 | /** |
||
87 | * @param TestResult $testResult |
||
88 | * |
||
89 | * @return void |
||
90 | */ |
||
91 | protected function setTestResult($testResult) |
||
96 | |||
97 | |||
98 | /** |
||
99 | * @param TestResult $testResult |
||
100 | * |
||
101 | * @return void |
||
102 | */ |
||
103 | protected function addTestResult($testResult) |
||
108 | |||
109 | |||
110 | /** |
||
111 | * @return TestResult |
||
112 | */ |
||
113 | public function getTestResult() |
||
118 | |||
119 | |||
120 | /** |
||
121 | * @return array |
||
122 | */ |
||
123 | public function getMessages() |
||
128 | |||
129 | |||
130 | /** |
||
131 | * @param string|null $item |
||
132 | * |
||
133 | * @return mixed |
||
134 | */ |
||
135 | public function getOutput($item = null) |
||
140 | |||
141 | |||
142 | /** |
||
143 | * @return State |
||
144 | */ |
||
145 | public function getState() |
||
150 | |||
151 | |||
152 | /** |
||
153 | * @return void |
||
154 | */ |
||
155 | protected function setMessages($messages) |
||
160 | |||
161 | |||
162 | /** |
||
163 | * @param array $messages |
||
164 | * @param string|null $index |
||
165 | * |
||
166 | * @return void |
||
167 | */ |
||
168 | protected function addMessages($messages, $index = null) |
||
178 | |||
179 | |||
180 | /** |
||
181 | * @param State $state |
||
182 | * @param string $category |
||
183 | * @param string $subject |
||
184 | * @param string $message |
||
185 | * |
||
186 | * @return void |
||
187 | */ |
||
188 | protected function addMessage($state, $category, $subject, $message) |
||
193 | |||
194 | |||
195 | /** |
||
196 | * @param mixed $value |
||
197 | * @param string|null $index |
||
198 | * |
||
199 | * @return void |
||
200 | */ |
||
201 | protected function addOutput($value, $index = null) |
||
209 | |||
210 | |||
211 | /** |
||
212 | * @return void |
||
213 | */ |
||
214 | protected function setOutput($output) |
||
219 | |||
220 | |||
221 | /** |
||
222 | * @return void |
||
223 | */ |
||
224 | protected function setState($state) |
||
229 | } |
||
230 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..