@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | /** |
| 161 | 161 | * Get current in-transfer timeout |
| 162 | 162 | * |
| 163 | - * @return float |
|
| 163 | + * @return integer |
|
| 164 | 164 | */ |
| 165 | 165 | public function getTimeout() |
| 166 | 166 | { |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | /** |
| 171 | 171 | * Get current local writing timeout |
| 172 | 172 | * |
| 173 | - * @return float |
|
| 173 | + * @return integer |
|
| 174 | 174 | */ |
| 175 | 175 | public function getWritingTimeout() |
| 176 | 176 | { |
@@ -235,6 +235,9 @@ discard block |
||
| 235 | 235 | return stream_get_meta_data($this->resource); |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | + /** |
|
| 239 | + * @param double $value |
|
| 240 | + */ |
|
| 238 | 241 | private function validateTimeout($value) |
| 239 | 242 | { |
| 240 | 243 | $ok = filter_var($value, FILTER_VALIDATE_FLOAT); |
@@ -290,6 +293,9 @@ discard block |
||
| 290 | 293 | } |
| 291 | 294 | } |
| 292 | 295 | |
| 296 | + /** |
|
| 297 | + * @param string $data |
|
| 298 | + */ |
|
| 293 | 299 | private function writeToSocket($data) |
| 294 | 300 | { |
| 295 | 301 | $length = strlen($data); |
@@ -319,6 +325,9 @@ discard block |
||
| 319 | 325 | } |
| 320 | 326 | } |
| 321 | 327 | |
| 328 | + /** |
|
| 329 | + * @param integer $sent |
|
| 330 | + */ |
|
| 322 | 331 | private function writingIsTimedOut($sent) |
| 323 | 332 | { |
| 324 | 333 | $writingTimeout = (int) floor($this->writingTimeout); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | private $dirCreated; |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @param resource|string $stream |
|
| 33 | + * @param string $stream |
|
| 34 | 34 | * @param int $level The minimum logging level at which this handler will be triggered |
| 35 | 35 | * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not |
| 36 | 36 | * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) |
@@ -288,6 +288,10 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | + /** |
|
| 292 | + * @param integer $given |
|
| 293 | + * @param integer $expected |
|
| 294 | + */ |
|
| 291 | 295 | private function validateArity($from, $given, $expected) |
| 292 | 296 | { |
| 293 | 297 | if ($given != $expected) { |
@@ -296,6 +300,9 @@ discard block |
||
| 296 | 300 | } |
| 297 | 301 | } |
| 298 | 302 | |
| 303 | + /** |
|
| 304 | + * @param string $from |
|
| 305 | + */ |
|
| 299 | 306 | private function validate($from, $args, $types = []) |
| 300 | 307 | { |
| 301 | 308 | $this->validateArity($from, count($args), count($types)); |
@@ -353,7 +360,7 @@ discard block |
||
| 353 | 360 | * |
| 354 | 361 | * @param string $from String of function:argument_position |
| 355 | 362 | * @param array $values Values to reduce. |
| 356 | - * @param array $types Array of valid value types. |
|
| 363 | + * @param string[] $types Array of valid value types. |
|
| 357 | 364 | * @param callable $reduce Reduce function that accepts ($carry, $item). |
| 358 | 365 | * |
| 359 | 366 | * @return mixed |
@@ -377,9 +384,9 @@ discard block |
||
| 377 | 384 | * |
| 378 | 385 | * @param string $from Function name : position |
| 379 | 386 | * @param callable $expr Expression function to validate. |
| 380 | - * @param array $types Array of acceptable return type values. |
|
| 387 | + * @param string[] $types Array of acceptable return type values. |
|
| 381 | 388 | * |
| 382 | - * @return callable Returns a wrapped function |
|
| 389 | + * @return \Closure Returns a wrapped function |
|
| 383 | 390 | */ |
| 384 | 391 | private function wrapExpression($from, callable $expr, array $types) |
| 385 | 392 | { |
@@ -184,6 +184,9 @@ discard block |
||
| 184 | 184 | return $endpoint; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | + /** |
|
| 188 | + * @param integer $length |
|
| 189 | + */ |
|
| 187 | 190 | private static function adjustSlice($length, $start, $stop, $step) |
| 188 | 191 | { |
| 189 | 192 | if ($step === null) { |
@@ -207,6 +210,11 @@ discard block |
||
| 207 | 210 | return [$start, $stop, $step]; |
| 208 | 211 | } |
| 209 | 212 | |
| 213 | + /** |
|
| 214 | + * @param integer|null $start |
|
| 215 | + * @param integer|null $stop |
|
| 216 | + * @param integer $step |
|
| 217 | + */ |
|
| 210 | 218 | private static function sliceIndices($subject, $start, $stop, $step) |
| 211 | 219 | { |
| 212 | 220 | $type = gettype($subject); |
@@ -219,7 +219,7 @@ |
||
| 219 | 219 | * @param string $id The unique identifier for the object |
| 220 | 220 | * @param callable $callable A service definition to extend the original |
| 221 | 221 | * |
| 222 | - * @return callable The wrapped callable |
|
| 222 | + * @return \Closure The wrapped callable |
|
| 223 | 223 | * |
| 224 | 224 | * @throws \InvalidArgumentException if the identifier is not defined or not a service definition |
| 225 | 225 | */ |
@@ -244,7 +244,7 @@ |
||
| 244 | 244 | * |
| 245 | 245 | * @param string $path |
| 246 | 246 | * @param string|resource $contents |
| 247 | - * @param string|array $mode |
|
| 247 | + * @param string $mode |
|
| 248 | 248 | * |
| 249 | 249 | * @return array |
| 250 | 250 | */ |
@@ -241,6 +241,7 @@ |
||
| 241 | 241 | |
| 242 | 242 | /** |
| 243 | 243 | * {@inheritdoc} |
| 244 | + * @param string $path |
|
| 244 | 245 | */ |
| 245 | 246 | public function applyPathPrefix($path): string |
| 246 | 247 | { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | /** |
| 116 | 116 | * Registers the error handler. |
| 117 | 117 | * |
| 118 | - * @param self|null|int $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels |
|
| 118 | + * @param ErrorHandler $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels |
|
| 119 | 119 | * @param bool $replace Whether to replace or not any existing handler |
| 120 | 120 | * |
| 121 | 121 | * @return self The registered error handler |
@@ -355,6 +355,7 @@ discard block |
||
| 355 | 355 | |
| 356 | 356 | /** |
| 357 | 357 | * Re-registers as a PHP error handler if levels changed. |
| 358 | + * @param integer $prev |
|
| 358 | 359 | */ |
| 359 | 360 | private function reRegister($prev) |
| 360 | 361 | { |
@@ -145,6 +145,9 @@ discard block |
||
| 145 | 145 | return $this->class; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $class |
|
| 150 | + */ |
|
| 148 | 151 | public function setClass($class) |
| 149 | 152 | { |
| 150 | 153 | $this->class = $class; |
@@ -155,6 +158,9 @@ discard block |
||
| 155 | 158 | return $this->file; |
| 156 | 159 | } |
| 157 | 160 | |
| 161 | + /** |
|
| 162 | + * @param string $file |
|
| 163 | + */ |
|
| 158 | 164 | public function setFile($file) |
| 159 | 165 | { |
| 160 | 166 | $this->file = $file; |
@@ -165,6 +171,9 @@ discard block |
||
| 165 | 171 | return $this->line; |
| 166 | 172 | } |
| 167 | 173 | |
| 174 | + /** |
|
| 175 | + * @param integer $line |
|
| 176 | + */ |
|
| 168 | 177 | public function setLine($line) |
| 169 | 178 | { |
| 170 | 179 | $this->line = $line; |
@@ -175,6 +184,9 @@ discard block |
||
| 175 | 184 | return $this->message; |
| 176 | 185 | } |
| 177 | 186 | |
| 187 | + /** |
|
| 188 | + * @param string $message |
|
| 189 | + */ |
|
| 178 | 190 | public function setMessage($message) |
| 179 | 191 | { |
| 180 | 192 | $this->message = $message; |
@@ -221,6 +233,10 @@ discard block |
||
| 221 | 233 | $this->setTrace($exception->getTrace(), $exception->getFile(), $exception->getLine()); |
| 222 | 234 | } |
| 223 | 235 | |
| 236 | + /** |
|
| 237 | + * @param string $file |
|
| 238 | + * @param integer $line |
|
| 239 | + */ |
|
| 224 | 240 | public function setTrace($trace, $file, $line) |
| 225 | 241 | { |
| 226 | 242 | $this->trace = array(); |