@@ -362,7 +362,7 @@ |
||
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
365 | - * @param $signo |
|
365 | + * @param integer $signo |
|
366 | 366 | */ |
367 | 367 | public function signalToChildren($signo) { |
368 | 368 | foreach ($this->collections as $col) { |
@@ -27,9 +27,8 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Propagate event |
30 | - * @param string $name Event name |
|
31 | 30 | * @param mixed ...$args Arguments |
32 | - * @return this |
|
31 | + * @return EventHandlers |
|
33 | 32 | */ |
34 | 33 | public function event() { |
35 | 34 | $args = func_get_args(); |
@@ -50,9 +49,8 @@ discard block |
||
50 | 49 | |
51 | 50 | /** |
52 | 51 | * Propagate event |
53 | - * @param string $name Event name |
|
54 | 52 | * @param mixed ...$args Arguments |
55 | - * @return this |
|
53 | + * @return EventHandlers |
|
56 | 54 | */ |
57 | 55 | public function trigger() { |
58 | 56 | $args = func_get_args(); |
@@ -73,7 +71,6 @@ discard block |
||
73 | 71 | |
74 | 72 | /** |
75 | 73 | * Propagate event |
76 | - * @param string $name Event name |
|
77 | 74 | * @param mixed ...$args Arguments |
78 | 75 | * @return integer |
79 | 76 | */ |
@@ -107,7 +104,7 @@ discard block |
||
107 | 104 | * Bind event or events |
108 | 105 | * @param string|array $event Event name |
109 | 106 | * @param callable $cb Callback |
110 | - * @return this |
|
107 | + * @return EventHandlers |
|
111 | 108 | */ |
112 | 109 | public function bind($event, $cb) { |
113 | 110 | if ($cb !== null) { |
@@ -125,7 +122,7 @@ discard block |
||
125 | 122 | * @alias EventHandlers::bind |
126 | 123 | * @param string|array $event Event name |
127 | 124 | * @param callable $cb Callback |
128 | - * @return this |
|
125 | + * @return EventHandlers |
|
129 | 126 | */ |
130 | 127 | public function on($event, $cb) { |
131 | 128 | return $this->bind($event, $cb); |
@@ -135,7 +132,7 @@ discard block |
||
135 | 132 | * Unbind event(s) or callback from event(s) |
136 | 133 | * @param string|array $event Event name |
137 | 134 | * @param callable $cb Callback, optional |
138 | - * @return this |
|
135 | + * @return EventHandlers |
|
139 | 136 | */ |
140 | 137 | public function unbind($event, $cb = null) { |
141 | 138 | if ($cb !== null) { |
@@ -162,7 +159,7 @@ discard block |
||
162 | 159 | * @alias EventHandlers::unbind |
163 | 160 | * @param string|array $event Event name |
164 | 161 | * @param callable $cb Callback, optional |
165 | - * @return this |
|
162 | + * @return EventHandlers |
|
166 | 163 | */ |
167 | 164 | public function off($event, $cb) { |
168 | 165 | return $this->unbind($event, $cb); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Deferred event 'onSessionStart' |
56 | - * @return callable |
|
56 | + * @return \Closure |
|
57 | 57 | */ |
58 | 58 | public function onSessionStartEvent() { |
59 | 59 | return function ($sessionStartEvent) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Deferred event 'onSessionRead' |
83 | - * @return callable |
|
83 | + * @return \Closure |
|
84 | 84 | */ |
85 | 85 | public function onSessionReadEvent() { |
86 | 86 | return function ($sessionEvent) { |
@@ -209,6 +209,7 @@ discard block |
||
209 | 209 | * Parse quadro word (8 bytes) |
210 | 210 | * @param string &$p Data |
211 | 211 | * @param boolean $l Little endian? |
212 | + * @param string|false $p |
|
212 | 213 | * @return integer |
213 | 214 | */ |
214 | 215 | public static function getQword(&$p, $l = false) { |
@@ -361,7 +362,7 @@ discard block |
||
361 | 362 | /** |
362 | 363 | * Convert bytes into integer |
363 | 364 | * @alias Binary::bytes2int |
364 | - * @param string $str Bytes |
|
365 | + * @param integer $str Bytes |
|
365 | 366 | * @param boolean $l Little endian? Default is false |
366 | 367 | * @return integer |
367 | 368 | */ |
@@ -326,7 +326,6 @@ discard block |
||
326 | 326 | |
327 | 327 | /** |
328 | 328 | * Normalize encoding name |
329 | - * @param string $str Encoding name |
|
330 | 329 | * @return string |
331 | 330 | */ |
332 | 331 | public static function normalizeEncoding($encodingLabel) { |
@@ -353,7 +352,6 @@ discard block |
||
353 | 352 | |
354 | 353 | /** |
355 | 354 | * Encode |
356 | - * @param string $str Any string |
|
357 | 355 | * @return string |
358 | 356 | */ |
359 | 357 | public static function encode($encodingLabel, $text) { |
@@ -31,11 +31,18 @@ |
||
31 | 31 | return serialize($m); |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $m |
|
36 | + */ |
|
34 | 37 | function igbinary_unserialize($m) { |
35 | 38 | return unserialize($m); |
36 | 39 | } |
37 | 40 | } |
38 | 41 | if (!function_exists('setTimeout')) { |
42 | + |
|
43 | + /** |
|
44 | + * @param Closure $cb |
|
45 | + */ |
|
39 | 46 | function setTimeout($cb, $timeout = null, $id = null, $priority = null) { |
40 | 47 | return \PHPDaemon\Core\Timer::add($cb, $timeout, $id, $priority); |
41 | 48 | } |
@@ -106,7 +106,7 @@ |
||
106 | 106 | |
107 | 107 | /** |
108 | 108 | * @param string $cmd Command |
109 | - * @return integer |
|
109 | + * @return string |
|
110 | 110 | */ |
111 | 111 | public static function getCodeByCommand($cmd) { |
112 | 112 | if (self::$codesFlip === null) { |
@@ -106,7 +106,7 @@ |
||
106 | 106 | |
107 | 107 | /** |
108 | 108 | * @param string $cmd Command |
109 | - * @return integer |
|
109 | + * @return string |
|
110 | 110 | */ |
111 | 111 | public static function getCodeByCommand($cmd) { |
112 | 112 | if (self::$codesFlip === null) { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * Returns a proxy callback function with logging for debugging purposes |
59 | 59 | * @param callable $cb Callback |
60 | 60 | * @param mixed $name Data |
61 | - * @return callable |
|
61 | + * @return \Closure |
|
62 | 62 | */ |
63 | 63 | public static function proxy($cb, $name = null) { |
64 | 64 | static $i = 0; |