Completed
Pull Request — master (#229)
by Дмитрий
04:18
created
PHPDaemon/Utils/Binary.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,6 +209,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	 */
Please login to merge, or discard this patch.
PHPDaemon/Utils/Encoding.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -326,7 +326,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
PHPDaemon/Utils/IRC.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
PHPDaemon/Cache/CappedStorage.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
PHPDaemon/Servers/WebSocket/Protocols/V13.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,9 +137,9 @@
 block discarded – undo
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
 		for ($i = 0, $l = strlen($data), $ml = strlen($mask); $i < $l; $i++) {
Please login to merge, or discard this patch.
PHPDaemon/Servers/WebSocket/Connection.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 	/**
105 105
 	 * Get real frame type identificator
106
-	 * @param $type
106
+	 * @param string|null $type
107 107
 	 * @return integer
108 108
 	 */
109 109
 	public function getFrameType($type) {
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
 	/**
210 210
 	 * Called when we're going to handshake.
211
-	 * @return boolean               Handshake status
211
+	 * @return false|null               Handshake status
212 212
 	 */
213 213
 	public function handshake() {
214 214
 		$this->route = $this->pool->getRoute($this->server['DOCUMENT_URI'], $this);
@@ -432,6 +432,9 @@  discard block
 block discarded – undo
432 432
 		return true;
433 433
 	}
434 434
 
435
+	/**
436
+	 * @param string $proto
437
+	 */
435 438
 	protected function switchToProtocol($proto) {
436 439
 		$class = '\\PHPDaemon\\Servers\\WebSocket\\Protocols\\' . $proto;
437 440
 		$conn  = new $class(null, $this->pool);
Please login to merge, or discard this patch.
PHPDaemon/DNode/DNode.php 1 patch
Doc Comments   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -85,9 +85,8 @@  discard block
 block discarded – undo
85 85
 
86 86
 	/**
87 87
 	 * Calls a local method
88
-	 * @param  string $method  Method name
89 88
 	 * @param  mixed  ...$args Arguments
90
-	 * @return this
89
+	 * @return DNode
91 90
 	 */
92 91
 	public function callLocal() {
93 92
 		$args = func_get_args();
@@ -170,9 +169,8 @@  discard block
 block discarded – undo
170 169
 
171 170
 	/**
172 171
 	 * Calls a remote method
173
-	 * @param  string $method  Method name
174 172
 	 * @param  mixed  ...$args Arguments
175
-	 * @return this
173
+	 * @return DNode
176 174
 	 */
177 175
 	public function callRemote() {
178 176
 		$args = func_get_args();
@@ -188,7 +186,7 @@  discard block
 block discarded – undo
188 186
 	 * Calls a remote method with array of arguments
189 187
 	 * @param  string $method Method name
190 188
 	 * @param  array  $args   Arguments
191
-	 * @return this
189
+	 * @return DNode
192 190
 	 */
193 191
 	public function callRemoteArray($method, $args) {
194 192
 		if (isset($this->remoteMethods[$method])) {
@@ -223,7 +221,7 @@  discard block
 block discarded – undo
223 221
 	/**
224 222
 	 * Encodes value into JSON
225 223
 	 * @param  mixed $m Value
226
-	 * @return this
224
+	 * @return string
227 225
 	 */
228 226
 	public static function toJson($m) {
229 227
 		return json_encode($m, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
@@ -258,7 +256,7 @@  discard block
 block discarded – undo
258 256
 	/**
259 257
 	 * Encodes value into JSON for debugging purposes
260 258
 	 * @param mixed $m Data
261
-	 * @return void
259
+	 * @return string
262 260
 	 */
263 261
 	public static function toJsonDebug($m) {
264 262
 		static::toJsonDebugResursive($m);
Please login to merge, or discard this patch.
PHPDaemon/Core/ComplexJob.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	/**
145 145
 	 * Sets a limit of simultaneously executing tasks
146 146
 	 * @param  integer $n Natural number or -1 (no limit)
147
-	 * @return this
147
+	 * @return ComplexJob
148 148
 	 */
149 149
 	public function maxConcurrency($n = -1) {
150 150
 		$this->maxConcurrency = $n;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	/**
217 217
 	 * Sets a callback which is going to be fired always when we have a room for more jobs
218 218
 	 * @param  callable $cb Callback
219
-	 * @return this
219
+	 * @return ComplexJob
220 220
 	 */
221 221
 	public function more($cb = null) {
222 222
 		if ($cb !== null) {
Please login to merge, or discard this patch.
PHPDaemon/Clients/Mongo/Pool.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
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
 		return function ($conn) use ($opcode, $data, $reply, $sentcb) {
@@ -1482,6 +1482,9 @@  discard block
 block discarded – undo
1482 1482
 		}, $session['conn']);
1483 1483
 	}
1484 1484
 
1485
+	/**
1486
+	 * @param \Closure $cb
1487
+	 */
1485 1488
 	public function sasl_scrum_sha1_conversation($dbname, $query, $cb, $conn = null)
1486 1489
 	{
1487 1490
 		if ($this->safeMode) {
Please login to merge, or discard this patch.