@@ -93,6 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * @param array ...$args |
| 96 | + * @param resource $args |
|
| 96 | 97 | * @return \EventBufferEvent |
| 97 | 98 | */ |
| 98 | 99 | public function bufferEvent(...$args) |
@@ -102,6 +103,7 @@ discard block |
||
| 102 | 103 | |
| 103 | 104 | /** |
| 104 | 105 | * @param array ...$args |
| 106 | + * @param resource $args |
|
| 105 | 107 | * @return mixed |
| 106 | 108 | */ |
| 107 | 109 | public function bufferEventSsl(...$args) |
@@ -119,7 +121,7 @@ discard block |
||
| 119 | 121 | } |
| 120 | 122 | |
| 121 | 123 | /** |
| 122 | - * @param null $cb |
|
| 124 | + * @param \Closure $cb |
|
| 123 | 125 | */ |
| 124 | 126 | public function interrupt($cb = null) |
| 125 | 127 | { |
@@ -45,12 +45,19 @@ |
||
| 45 | 45 | return serialize($m); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $m |
|
| 50 | + */ |
|
| 48 | 51 | function igbinary_unserialize($m) |
| 49 | 52 | { |
| 50 | 53 | return unserialize($m); |
| 51 | 54 | } |
| 52 | 55 | } |
| 53 | 56 | if (!function_exists('setTimeout')) { |
| 57 | + |
|
| 58 | + /** |
|
| 59 | + * @param Closure $cb |
|
| 60 | + */ |
|
| 54 | 61 | function setTimeout($cb, $timeout = null, $id = null, $priority = null) |
| 55 | 62 | { |
| 56 | 63 | return \PHPDaemon\Core\Timer::add($cb, $timeout, $id, $priority); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * @param array $flags |
|
| 191 | + * @param string[] $flags |
|
| 192 | 192 | * @param string $from |
| 193 | 193 | * @param string $to |
| 194 | 194 | * @param string $mode (+/-) |
@@ -241,8 +241,6 @@ discard block |
||
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /** |
| 244 | - * @param string $haystack |
|
| 245 | - * @param string $needle |
|
| 246 | 244 | */ |
| 247 | 245 | public function auth($cb, $login, $password) |
| 248 | 246 | { |
@@ -555,7 +553,7 @@ discard block |
||
| 555 | 553 | * create a new folder (and parent folders if needed) |
| 556 | 554 | * |
| 557 | 555 | * @param string $folder folder name |
| 558 | - * @return bool success |
|
| 556 | + * @return boolean|null success |
|
| 559 | 557 | */ |
| 560 | 558 | public function createFolder($cb, $folder, $parentFolder = null) |
| 561 | 559 | { |
@@ -569,7 +567,6 @@ discard block |
||
| 569 | 567 | /** |
| 570 | 568 | * remove a folder |
| 571 | 569 | * |
| 572 | - * @param string $name name or instance of folder |
|
| 573 | 570 | */ |
| 574 | 571 | public function removeFolder($cb, $folder) |
| 575 | 572 | { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | * @param boolean $reply Is an answer expected? |
| 183 | 183 | * @param callable $sentcb Sent callback |
| 184 | 184 | * @callback $sentcb ( ) |
| 185 | - * @return callable |
|
| 185 | + * @return \Closure |
|
| 186 | 186 | */ |
| 187 | 187 | protected function requestCbProducer($opcode, $data, $reply = false, $sentcb = null) |
| 188 | 188 | { |
@@ -1580,6 +1580,9 @@ discard block |
||
| 1580 | 1580 | }, $session['conn']); |
| 1581 | 1581 | } |
| 1582 | 1582 | |
| 1583 | + /** |
|
| 1584 | + * @param \Closure $cb |
|
| 1585 | + */ |
|
| 1583 | 1586 | public function saslScrumSHA1Conversation($dbname, $query, $cb, $conn = null) |
| 1584 | 1587 | { |
| 1585 | 1588 | if ($this->safeMode) { |
@@ -70,7 +70,6 @@ |
||
| 70 | 70 | * Magic __call |
| 71 | 71 | * Example: |
| 72 | 72 | * $redis->lpush('mylist', microtime(true)); |
| 73 | - * @param string $name Command name |
|
| 74 | 73 | * @param array $args Arguments |
| 75 | 74 | * @return void |
| 76 | 75 | */ |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | /** |
| 207 | 207 | * Sets a callback which is going to be fired always when we have a room for more jobs |
| 208 | 208 | * @param callable $cb Callback |
| 209 | - * @return this |
|
| 209 | + * @return ComplexJob |
|
| 210 | 210 | */ |
| 211 | 211 | public function more($cb = null) |
| 212 | 212 | { |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | /** |
| 304 | 304 | * Sets a limit of simultaneously executing tasks |
| 305 | 305 | * @param integer $n Natural number or -1 (no limit) |
| 306 | - * @return this |
|
| 306 | + * @return ComplexJob |
|
| 307 | 307 | */ |
| 308 | 308 | public function maxConcurrency($n = -1) |
| 309 | 309 | { |
@@ -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 | { |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | * @param integer $timeout Timeout |
| 107 | 107 | * @param integer|string $id Timer ID |
| 108 | 108 | * @param integer $priority Priority |
| 109 | - * @return integer|string Timer ID |
|
| 109 | + * @return integer|null Timer ID |
|
| 110 | 110 | */ |
| 111 | 111 | public static function add($cb, $timeout = null, $id = null, $priority = null) |
| 112 | 112 | { |
@@ -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 | { |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | * @param integer $offset Offset |
| 413 | 413 | * @param callable $cb Callback |
| 414 | 414 | * @param integer $pri Priority |
| 415 | - * @return boolean |
|
| 415 | + * @return string|boolean |
|
| 416 | 416 | */ |
| 417 | 417 | public function read($length, $offset = null, $cb = null, $pri = EIO_PRI_DEFAULT) |
| 418 | 418 | { |
@@ -577,7 +577,10 @@ discard block |
||
| 577 | 577 | * @param integer &$offset |
| 578 | 578 | * @param integer &$pri |
| 579 | 579 | * @param string &$buf |
| 580 | - * @return callable |
|
| 580 | + * @param integer $offset |
|
| 581 | + * @param integer $pri |
|
| 582 | + * @param string $buf |
|
| 583 | + * @return \Closure |
|
| 581 | 584 | */ |
| 582 | 585 | protected function readAllGenHandler($cb, $size, &$offset, &$pri, &$buf) |
| 583 | 586 | { |
@@ -645,7 +648,7 @@ discard block |
||
| 645 | 648 | * @param integer $size |
| 646 | 649 | * @param integer $offset |
| 647 | 650 | * @param integer $pri |
| 648 | - * @return callable |
|
| 651 | + * @return \Closure |
|
| 649 | 652 | */ |
| 650 | 653 | protected function readAllChunkedGenHandler($cb, $chunkcb, $size, &$offset, $pri) |
| 651 | 654 | { |