1 | <?php |
||
11 | abstract class BaseRunner |
||
12 | { |
||
13 | const PHPUNIT_FATAL_ERROR = 255; |
||
14 | |||
15 | /** |
||
16 | * @var Options |
||
17 | */ |
||
18 | protected $options; |
||
19 | |||
20 | /** |
||
21 | * @var \ParaTest\Logging\LogInterpreter |
||
22 | */ |
||
23 | protected $interpreter; |
||
24 | |||
25 | /** |
||
26 | * @var ResultPrinter |
||
27 | */ |
||
28 | protected $printer; |
||
29 | |||
30 | /** |
||
31 | * A collection of pending ExecutableTest objects that have |
||
32 | * yet to run. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $pending = []; |
||
37 | |||
38 | /** |
||
39 | * A collection of ExecutableTest objects that have processes |
||
40 | * currently running. |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $running = []; |
||
45 | |||
46 | /** |
||
47 | * A tallied exit code that returns the highest exit |
||
48 | * code returned out of the entire collection of tests. |
||
49 | * |
||
50 | * @var int |
||
51 | */ |
||
52 | protected $exitcode = -1; |
||
53 | |||
54 | /** |
||
55 | * CoverageMerger to hold track of the accumulated coverage. |
||
56 | * |
||
57 | * @var CoverageMerger |
||
58 | */ |
||
59 | protected $coverage = null; |
||
60 | |||
61 | 8 | public function __construct(array $opts = []) |
|
67 | |||
68 | 2 | public function run() |
|
75 | |||
76 | /** |
||
77 | * Ensures a valid configuration was supplied. If not |
||
78 | * causes ParaTest to print the error message and exit immediately |
||
79 | * with an exit code of 1. |
||
80 | */ |
||
81 | 2 | protected function verifyConfiguration() |
|
88 | |||
89 | /** |
||
90 | * Builds the collection of pending ExecutableTest objects |
||
91 | * to run. If functional mode is enabled $this->pending will |
||
92 | * contain a collection of TestMethod objects instead of Suite |
||
93 | * objects. |
||
94 | */ |
||
95 | 2 | protected function load() |
|
105 | |||
106 | /** |
||
107 | * Returns the highest exit code encountered |
||
108 | * throughout the course of test execution. |
||
109 | * |
||
110 | * @return int |
||
111 | */ |
||
112 | 1 | public function getExitCode(): int |
|
116 | |||
117 | /** |
||
118 | * Write output to JUnit format if requested. |
||
119 | */ |
||
120 | 2 | protected function log() |
|
129 | |||
130 | /** |
||
131 | * Write coverage to file if requested. |
||
132 | */ |
||
133 | 2 | protected function logCoverage() |
|
153 | |||
154 | 2 | protected function initCoverage() |
|
162 | |||
163 | /** |
||
164 | * @return bool |
||
165 | */ |
||
166 | 2 | protected function hasCoverage(): bool |
|
170 | |||
171 | /** |
||
172 | * @return CoverageMerger|null |
||
173 | */ |
||
174 | 2 | protected function getCoverage() |
|
178 | } |
||
179 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.