1 | <?php |
||
6 | class Runner extends BaseRunner |
||
7 | { |
||
8 | /** |
||
9 | * A collection of available tokens based on the number |
||
10 | * of processes specified in $options |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $tokens = []; |
||
15 | |||
16 | |||
17 | 8 | public function __construct($opts = []) |
|
22 | |||
23 | /** |
||
24 | * The money maker. Runs all ExecutableTest objects in separate processes. |
||
25 | */ |
||
26 | 2 | public function run() |
|
42 | |||
43 | /** |
||
44 | * Finalizes the run process. This method |
||
45 | * prints all results, rewinds the log interpreter, |
||
46 | * logs any results to JUnit, and cleans up temporary |
||
47 | * files |
||
48 | */ |
||
49 | 2 | private function complete() |
|
60 | |||
61 | /** |
||
62 | * This method removes ExecutableTest objects from the pending collection |
||
63 | * and adds them to the running collection. It is also in charge of recycling and |
||
64 | * acquiring available test tokens for use |
||
65 | */ |
||
66 | 2 | private function fillRunQueue() |
|
78 | |||
79 | /** |
||
80 | * Returns whether or not a test has finished being |
||
81 | * executed. If it has, this method also halts a test process - optionally |
||
82 | * throwing an exception if a fatal error has occurred - |
||
83 | * prints feedback, and updates the overall exit code |
||
84 | * |
||
85 | * @param ExecutableTest $test |
||
86 | * @return bool |
||
87 | * @throws \Exception |
||
88 | */ |
||
89 | 2 | private function testIsStillRunning($test) |
|
113 | |||
114 | /** |
||
115 | * If the provided test object has an exit code |
||
116 | * higher than the currently set exit code, that exit |
||
117 | * code will be set as the overall exit code |
||
118 | * |
||
119 | * @param ExecutableTest $test |
||
120 | */ |
||
121 | 2 | private function setExitCode(ExecutableTest $test) |
|
128 | |||
129 | /** |
||
130 | * Initialize the available test tokens based |
||
131 | * on how many processes ParaTest will be run in |
||
132 | */ |
||
133 | 8 | protected function initTokens() |
|
140 | |||
141 | /** |
||
142 | * Gets the next token that is available to be acquired |
||
143 | * from a finished process |
||
144 | * |
||
145 | * @return bool|array |
||
146 | */ |
||
147 | 4 | protected function getNextAvailableToken() |
|
156 | |||
157 | /** |
||
158 | * Flag a token as available for use |
||
159 | * |
||
160 | * @param string $tokenIdentifier |
||
161 | */ |
||
162 | 3 | protected function releaseToken($tokenIdentifier) |
|
170 | |||
171 | /** |
||
172 | * Flag a token as acquired and not available for use |
||
173 | * |
||
174 | * @param string $tokenIdentifier |
||
175 | */ |
||
176 | protected function acquireToken($tokenIdentifier) |
||
184 | |||
185 | /** |
||
186 | * @param ExecutableTest $test |
||
187 | */ |
||
188 | 2 | private function addCoverage(ExecutableTest $test) |
|
193 | } |
||
194 |
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.