@@ -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 | { |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | * Returns instance object |
| 158 | 158 | * @param string $arg name / array config / ConfigSection |
| 159 | 159 | * @param boolean $spawn Spawn? Default is true |
| 160 | - * @return this |
|
| 160 | + * @return Pool |
|
| 161 | 161 | */ |
| 162 | 162 | public static function getInstance($arg = '', $spawn = true) |
| 163 | 163 | { |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | /** |
| 46 | 46 | * Sets onActivation callback |
| 47 | 47 | * @param callable $cb Callback |
| 48 | - * @return this |
|
| 48 | + * @return PubSubEvent |
|
| 49 | 49 | */ |
| 50 | 50 | public function onActivation($cb) |
| 51 | 51 | { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | /** |
| 57 | 57 | * Sets onDeactivation callback |
| 58 | 58 | * @param callable $cb Callback |
| 59 | - * @return this |
|
| 59 | + * @return PubSubEvent |
|
| 60 | 60 | */ |
| 61 | 61 | public function onDeactivation($cb) |
| 62 | 62 | { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * Init |
| 69 | - * @return object |
|
| 69 | + * @return PubSubEvent |
|
| 70 | 70 | */ |
| 71 | 71 | public static function init() |
| 72 | 72 | { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * Subscribe |
| 78 | 78 | * @param object $obj Subcriber object |
| 79 | 79 | * @param callable $cb Callback |
| 80 | - * @return this |
|
| 80 | + * @return PubSubEvent |
|
| 81 | 81 | */ |
| 82 | 82 | public function sub($obj, $cb) |
| 83 | 83 | { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | /** |
| 95 | 95 | * Unsubscripe |
| 96 | 96 | * @param object $obj Subscriber object |
| 97 | - * @return this |
|
| 97 | + * @return PubSubEvent |
|
| 98 | 98 | */ |
| 99 | 99 | public function unsub($obj) |
| 100 | 100 | { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | /** |
| 111 | 111 | * Publish |
| 112 | 112 | * @param mixed $data Data |
| 113 | - * @return this |
|
| 113 | + * @return PubSubEvent |
|
| 114 | 114 | */ |
| 115 | 115 | public function pub($data) |
| 116 | 116 | { |
@@ -331,7 +331,7 @@ |
||
| 331 | 331 | |
| 332 | 332 | /** |
| 333 | 333 | * Handles the output from downstream requests |
| 334 | - * @param object $req |
|
| 334 | + * @param \stdClass $req |
|
| 335 | 335 | * @param string $appStatus |
| 336 | 336 | * @param string $protoStatus |
| 337 | 337 | * @return void |
@@ -344,6 +344,9 @@ |
||
| 344 | 344 | |
| 345 | 345 | /** |
| 346 | 346 | * End request |
| 347 | + * @param \stdClass $req |
|
| 348 | + * @param integer $appStatus |
|
| 349 | + * @param integer $protoStatus |
|
| 347 | 350 | * @return void |
| 348 | 351 | */ |
| 349 | 352 | public function endRequest($req, $appStatus, $protoStatus) |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | 107 | * Get real frame type identificator |
| 108 | - * @param $type |
|
| 108 | + * @param string|null $type |
|
| 109 | 109 | * @return integer |
| 110 | 110 | */ |
| 111 | 111 | public function getFrameType($type) |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | /** |
| 220 | 220 | * Called when we're going to handshake. |
| 221 | - * @return boolean Handshake status |
|
| 221 | + * @return false|null Handshake status |
|
| 222 | 222 | */ |
| 223 | 223 | public function handshake() |
| 224 | 224 | { |
@@ -446,6 +446,9 @@ discard block |
||
| 446 | 446 | return true; |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | + /** |
|
| 450 | + * @param string $proto |
|
| 451 | + */ |
|
| 449 | 452 | protected function switchToProtocol($proto) |
| 450 | 453 | { |
| 451 | 454 | $class = '\\PHPDaemon\\Servers\\WebSocket\\Protocols\\' . $proto; |
@@ -137,9 +137,9 @@ |
||
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | 139 | * Apply mask |
| 140 | - * @param $data |
|
| 140 | + * @param string|false $data |
|
| 141 | 141 | * @param string|false $mask |
| 142 | - * @return mixed |
|
| 142 | + * @return string |
|
| 143 | 143 | */ |
| 144 | 144 | public function mask($data, $mask) |
| 145 | 145 | { |