@@ -81,6 +81,9 @@ |
||
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | + /** |
|
85 | + * @param null|callable $cb |
|
86 | + */ |
|
84 | 87 | public static function addToArray(&$arr, $cb) |
85 | 88 | { |
86 | 89 | if ($arr === null) { |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | /** |
154 | 154 | * Sets a limit of simultaneously executing tasks |
155 | 155 | * @param integer $n Natural number or -1 (no limit) |
156 | - * @return this |
|
156 | + * @return ComplexJob |
|
157 | 157 | */ |
158 | 158 | public function maxConcurrency($n = -1) |
159 | 159 | { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | /** |
231 | 231 | * Sets a callback which is going to be fired always when we have a room for more jobs |
232 | 232 | * @param callable $cb Callback |
233 | - * @return this |
|
233 | + * @return ComplexJob |
|
234 | 234 | */ |
235 | 235 | public function more($cb = null) |
236 | 236 | { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | * Returns a proxy callback function with logging for debugging purposes |
63 | 63 | * @param callable $cb Callback |
64 | 64 | * @param mixed $name Data |
65 | - * @return callable |
|
65 | + * @return \Closure |
|
66 | 66 | */ |
67 | 67 | public static function proxy($cb, $name = null) |
68 | 68 | { |
@@ -113,7 +113,7 @@ |
||
113 | 113 | |
114 | 114 | /** |
115 | 115 | * Reset |
116 | - * @return this |
|
116 | + * @return DeferredEvent |
|
117 | 117 | */ |
118 | 118 | public function reset() |
119 | 119 | { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | /** |
114 | 114 | * Set group |
115 | - * @return this |
|
115 | + * @return ShellCommand |
|
116 | 116 | */ |
117 | 117 | public function setGroup($val) |
118 | 118 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | /** |
124 | 124 | * Set cwd |
125 | 125 | * @param string $dir |
126 | - * @return this |
|
126 | + * @return ShellCommand |
|
127 | 127 | */ |
128 | 128 | public function setCwd($dir) |
129 | 129 | { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | /** |
135 | 135 | * Set group |
136 | 136 | * @param string $val |
137 | - * @return this |
|
137 | + * @return ShellCommand |
|
138 | 138 | */ |
139 | 139 | public function setUser($val) |
140 | 140 | { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | /** |
146 | 146 | * Set chroot |
147 | 147 | * @param string $dir |
148 | - * @return this |
|
148 | + * @return ShellCommand |
|
149 | 149 | */ |
150 | 150 | public function setChroot($dir) |
151 | 151 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | /** |
224 | 224 | * Sets an array of arguments |
225 | 225 | * @param array Arguments |
226 | - * @return this |
|
226 | + * @return ShellCommand |
|
227 | 227 | */ |
228 | 228 | public function setArgs($args = null) |
229 | 229 | { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | /** |
236 | 236 | * Set a hash of environment's variables |
237 | 237 | * @param array Hash of environment's variables |
238 | - * @return this |
|
238 | + * @return ShellCommand |
|
239 | 239 | */ |
240 | 240 | public function setEnv($env = null) |
241 | 241 | { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | /** |
262 | 262 | * Set priority |
263 | 263 | * @param integer $nice Priority |
264 | - * @return this |
|
264 | + * @return ShellCommand |
|
265 | 265 | */ |
266 | 266 | public function nice($nice = null) |
267 | 267 | { |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | /** |
274 | 274 | * Called when new data received |
275 | - * @return this|null |
|
275 | + * @return ShellCommand|null |
|
276 | 276 | */ |
277 | 277 | protected function onRead() |
278 | 278 | { |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | * @param string $binPath Optional. Binpath |
317 | 317 | * @param array $args Optional. Arguments |
318 | 318 | * @param array $env Optional. Hash of environment's variables |
319 | - * @return this |
|
319 | + * @return ShellCommand |
|
320 | 320 | */ |
321 | 321 | public function execute($binPath = null, $args = null, $env = null) |
322 | 322 | { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | /** |
416 | 416 | * Close write stream |
417 | - * @return this |
|
417 | + * @return ShellCommand |
|
418 | 418 | */ |
419 | 419 | public function closeWrite() |
420 | 420 | { |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | /** |
495 | 495 | * Sets callback which will be called once when got EOF |
496 | 496 | * @param callable $cb |
497 | - * @return this |
|
497 | + * @return ShellCommand |
|
498 | 498 | */ |
499 | 499 | public function onEOF($cb = null) |
500 | 500 | { |
@@ -104,7 +104,7 @@ |
||
104 | 104 | * @param integer $timeout Timeout |
105 | 105 | * @param integer|string $id Timer ID |
106 | 106 | * @param integer $priority Priority |
107 | - * @return integer|string Timer ID |
|
107 | + * @return integer|null Timer ID |
|
108 | 108 | */ |
109 | 109 | public static function add($cb, $timeout = null, $id = null, $priority = null) |
110 | 110 | { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * Converts string of flags to integer or standard text representation |
101 | 101 | * @param string $mode Mode |
102 | 102 | * @param boolean $text Text? |
103 | - * @return mixed |
|
103 | + * @return string |
|
104 | 104 | */ |
105 | 105 | public static function convertFlags($mode, $text = false) |
106 | 106 | { |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | * @param integer $offset Offset |
405 | 405 | * @param callable $cb Callback |
406 | 406 | * @param integer $pri Priority |
407 | - * @return boolean |
|
407 | + * @return string|boolean |
|
408 | 408 | */ |
409 | 409 | public function read($length, $offset = null, $cb = null, $pri = EIO_PRI_DEFAULT) |
410 | 410 | { |
@@ -556,7 +556,10 @@ discard block |
||
556 | 556 | * @param integer &$offset |
557 | 557 | * @param integer &$pri |
558 | 558 | * @param string &$buf |
559 | - * @return callable |
|
559 | + * @param integer $offset |
|
560 | + * @param integer $pri |
|
561 | + * @param string $buf |
|
562 | + * @return \Closure |
|
560 | 563 | */ |
561 | 564 | protected function readAllGenHandler($cb, $size, &$offset, &$pri, &$buf) |
562 | 565 | { |
@@ -611,7 +614,7 @@ discard block |
||
611 | 614 | * @param integer $size |
612 | 615 | * @param integer $offset |
613 | 616 | * @param integer $pri |
614 | - * @return callable |
|
617 | + * @return \Closure |
|
615 | 618 | */ |
616 | 619 | protected function readAllChunkedGenHandler($cb, $chunkcb, $size, &$offset, $pri) |
617 | 620 | { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | * @param integer $offset Offset |
437 | 437 | * @param integer $length Length |
438 | 438 | * @param integer $pri Priority |
439 | - * @return true Success |
|
439 | + * @return boolean Success |
|
440 | 440 | */ |
441 | 441 | public static function sendfile($outfd, $path, $cb, $startCb = null, $offset = 0, $length = null, $pri = EIO_PRI_DEFAULT) |
442 | 442 | { |
@@ -568,10 +568,10 @@ discard block |
||
568 | 568 | |
569 | 569 | /** |
570 | 570 | * Generates closure tempnam handler |
571 | - * @param $dir |
|
572 | - * @param $prefix |
|
573 | - * @param $cb |
|
574 | - * @param $tries |
|
571 | + * @param string $dir |
|
572 | + * @param string $prefix |
|
573 | + * @param CallbackWrapper|null $cb |
|
574 | + * @param integer $tries |
|
575 | 575 | */ |
576 | 576 | protected static function tempnamHandler($dir, $prefix, $cb, &$tries) |
577 | 577 | { |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * @param string $path Path |
55 | 55 | * @param mixed $cb Callback |
56 | 56 | * @param integer $flags Look inotify_add_watch() |
57 | - * @return true |
|
57 | + * @return boolean |
|
58 | 58 | */ |
59 | 59 | public function addWatch($path, $cb, $flags = null) |
60 | 60 | { |