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