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() |
|
46 | |||
47 | /** |
||
48 | * Finalizes the run process. This method |
||
49 | * prints all results, rewinds the log interpreter, |
||
50 | * logs any results to JUnit, and cleans up temporary |
||
51 | * files |
||
52 | */ |
||
53 | 2 | public function complete() |
|
64 | |||
65 | /** |
||
66 | * This method removes ExecutableTest objects from the pending collection |
||
67 | * and adds them to the running collection. It is also in charge of recycling and |
||
68 | * acquiring available test tokens for use |
||
69 | */ |
||
70 | 2 | private function fillRunQueue() |
|
82 | |||
83 | /** |
||
84 | * Returns whether or not a test has finished being |
||
85 | * executed. If it has, this method also halts a test process - optionally |
||
86 | * throwing an exception if a fatal error has occurred - |
||
87 | * prints feedback, and updates the overall exit code |
||
88 | * |
||
89 | * @param ExecutableTest $test |
||
90 | * @return bool |
||
91 | * @throws \Exception |
||
92 | */ |
||
93 | 2 | private function testIsStillRunning($test) |
|
117 | |||
118 | /** |
||
119 | * If the provided test object has an exit code |
||
120 | * higher than the currently set exit code, that exit |
||
121 | * code will be set as the overall exit code |
||
122 | * |
||
123 | * @param ExecutableTest $test |
||
124 | */ |
||
125 | 2 | private function setExitCode(ExecutableTest $test) |
|
132 | |||
133 | /** |
||
134 | * Initialize the available test tokens based |
||
135 | * on how many processes ParaTest will be run in |
||
136 | */ |
||
137 | 8 | protected function initTokens() |
|
144 | |||
145 | /** |
||
146 | * Gets the next token that is available to be acquired |
||
147 | * from a finished process |
||
148 | * |
||
149 | * @return bool|array |
||
150 | */ |
||
151 | 4 | protected function getNextAvailableToken() |
|
160 | |||
161 | /** |
||
162 | * Flag a token as available for use |
||
163 | * |
||
164 | * @param string $tokenIdentifier |
||
165 | */ |
||
166 | 3 | protected function releaseToken($tokenIdentifier) |
|
174 | |||
175 | /** |
||
176 | * Flag a token as acquired and not available for use |
||
177 | * |
||
178 | * @param string $tokenIdentifier |
||
179 | */ |
||
180 | 2 | protected function acquireToken($tokenIdentifier) |
|
188 | |||
189 | /** |
||
190 | * @param ExecutableTest $test |
||
191 | */ |
||
192 | 2 | private function addCoverage(ExecutableTest $test) |
|
197 | } |
||
198 |
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.