1 | <?php |
||
12 | class Container |
||
13 | { |
||
14 | /** @var int */ |
||
15 | private $masterPid; |
||
16 | |||
17 | /** @var \Ackintosh\Snidel\Pcntl */ |
||
18 | private $pcntl; |
||
19 | |||
20 | /** @var \Ackintosh\Snidel\Error */ |
||
21 | private $error; |
||
22 | |||
23 | /** @var \Ackintosh\Snidel\Task\QueueInterface */ |
||
24 | private $taskQueue; |
||
25 | |||
26 | /** @var \Ackintosh\Snidel\Result\QueueInterface */ |
||
27 | private $resultQueue; |
||
28 | |||
29 | /** @var \Ackintosh\Snidel\Log */ |
||
30 | private $log; |
||
31 | |||
32 | /** @var array */ |
||
33 | private $signals = [ |
||
34 | SIGTERM, |
||
35 | SIGINT, |
||
36 | ]; |
||
37 | |||
38 | /** @var \Ackintosh\Snidel\Config */ |
||
39 | private $config; |
||
40 | |||
41 | /** @var \Ackintosh\Snidel\QueueFactory */ |
||
42 | private $queueFactory; |
||
43 | |||
44 | /** @var int */ |
||
45 | private $receivedSignal; |
||
46 | |||
47 | /** |
||
48 | * @param int $ownerPid |
||
|
|||
49 | */ |
||
50 | public function __construct(Config $config, $log) |
||
58 | |||
59 | /** |
||
60 | * @param \Ackintosh\Snidel\Task |
||
61 | * @return void |
||
62 | * @throws \RuntimeException |
||
63 | */ |
||
64 | public function enqueue($task) |
||
72 | |||
73 | /** |
||
74 | * @return int |
||
75 | */ |
||
76 | public function queuedCount() |
||
84 | |||
85 | /** |
||
86 | * @return \Ackintosh\Snidel\Result\Result |
||
87 | */ |
||
88 | private function dequeue() |
||
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | public function dequeuedCount() |
||
104 | |||
105 | /** |
||
106 | * fork process |
||
107 | * |
||
108 | * @return \Ackintosh\Snidel\Fork\Fork |
||
109 | * @throws \RuntimeException |
||
110 | */ |
||
111 | private function fork() |
||
122 | |||
123 | /** |
||
124 | * fork master process |
||
125 | * |
||
126 | * @return int $masterPid |
||
127 | */ |
||
128 | public function forkMaster() |
||
185 | |||
186 | /** |
||
187 | * fork worker process |
||
188 | * |
||
189 | * @return \Ackintosh\Snidel\Worker |
||
190 | * @throws \RuntimeException |
||
191 | */ |
||
192 | private function forkWorker() |
||
242 | |||
243 | /** |
||
244 | * @return bool |
||
245 | */ |
||
246 | public function existsMaster() |
||
250 | |||
251 | /** |
||
252 | * send signal to master process |
||
253 | * |
||
254 | * @return void |
||
255 | */ |
||
256 | public function sendSignalToMaster($sig = SIGTERM) |
||
268 | |||
269 | /** |
||
270 | * @return void |
||
271 | */ |
||
272 | public function wait() |
||
281 | |||
282 | /** |
||
283 | * @return \Generator |
||
284 | */ |
||
285 | public function results() |
||
298 | |||
299 | /** |
||
300 | * @return bool |
||
301 | */ |
||
302 | public function hasError() |
||
306 | |||
307 | /** |
||
308 | * @return \Ackintosh\Snidel\Error |
||
309 | */ |
||
310 | public function getError() |
||
314 | |||
315 | public function __destruct() |
||
320 | } |
||
321 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.