@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | /** |
264 | 264 | * @access public |
265 | 265 | * |
266 | - * @return bool |
|
266 | + * @return string |
|
267 | 267 | */ |
268 | 268 | public function cwd() { |
269 | 269 | $cwd = ssh2_sftp_realpath( $this->sftp_link, '.' ); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * @param string $group |
291 | 291 | * @param bool $recursive |
292 | 292 | * |
293 | - * @return bool |
|
293 | + * @return boolean|string |
|
294 | 294 | */ |
295 | 295 | public function chgrp($file, $group, $recursive = false ) { |
296 | 296 | if ( ! $this->exists($file) ) |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | * @param string $file Path to the file. |
335 | 335 | * @param string|int $owner A user name or number. |
336 | 336 | * @param bool $recursive Optional. If set True changes file owner recursivly. Default False. |
337 | - * @return bool True on success or false on failure. |
|
337 | + * @return boolean|string True on success or false on failure. |
|
338 | 338 | */ |
339 | 339 | public function chown( $file, $owner, $recursive = false ) { |
340 | 340 | if ( ! $this->exists($file) ) |
@@ -1589,7 +1589,7 @@ discard block |
||
1589 | 1589 | /** |
1590 | 1590 | * Get the error message for the occurred error. |
1591 | 1591 | * |
1592 | - * @return string|array Error message, or array of messages for multifeeds |
|
1592 | + * @return string Error message, or array of messages for multifeeds |
|
1593 | 1593 | */ |
1594 | 1594 | public function error() |
1595 | 1595 | { |
@@ -2582,7 +2582,7 @@ discard block |
||
2582 | 2582 | * @since 1.0 |
2583 | 2583 | * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo |
2584 | 2584 | * @link http://www.georss.org/ GeoRSS |
2585 | - * @return string|null |
|
2585 | + * @return double|null |
|
2586 | 2586 | */ |
2587 | 2587 | public function get_latitude() |
2588 | 2588 | { |
@@ -2611,7 +2611,7 @@ discard block |
||
2611 | 2611 | * @since 1.0 |
2612 | 2612 | * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo |
2613 | 2613 | * @link http://www.georss.org/ GeoRSS |
2614 | - * @return string|null |
|
2614 | + * @return double|null |
|
2615 | 2615 | */ |
2616 | 2616 | public function get_longitude() |
2617 | 2617 | { |
@@ -2753,7 +2753,7 @@ discard block |
||
2753 | 2753 | * Uses `<image><width>` or defaults to 88.0 if no width is specified and |
2754 | 2754 | * the feed is an RSS 2.0 feed. |
2755 | 2755 | * |
2756 | - * @return int|float|null |
|
2756 | + * @return double|null |
|
2757 | 2757 | */ |
2758 | 2758 | public function get_image_width() |
2759 | 2759 | { |
@@ -2779,7 +2779,7 @@ discard block |
||
2779 | 2779 | * Uses `<image><height>` or defaults to 31.0 if no height is specified and |
2780 | 2780 | * the feed is an RSS 2.0 feed. |
2781 | 2781 | * |
2782 | - * @return int|float|null |
|
2782 | + * @return double|null |
|
2783 | 2783 | */ |
2784 | 2784 | public function get_image_height() |
2785 | 2785 | { |
@@ -804,7 +804,7 @@ |
||
804 | 804 | * |
805 | 805 | * @param string $compare The compare operator to use |
806 | 806 | * @param string|array $value The value |
807 | - * @return string|false|int The value to be used in SQL or false on error. |
|
807 | + * @return string The value to be used in SQL or false on error. |
|
808 | 808 | */ |
809 | 809 | public function build_value( $compare, $value ) { |
810 | 810 | if ( ! isset( $value ) ) |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @param string $type Type of time to retrieve. Accepts 'mysql', 'timestamp', or PHP date |
57 | 57 | * format string (e.g. 'Y-m-d'). |
58 | - * @param int|bool $gmt Optional. Whether to use GMT timezone. Default false. |
|
58 | + * @param integer $gmt Optional. Whether to use GMT timezone. Default false. |
|
59 | 59 | * @return int|string Integer if $type is 'timestamp', string otherwise. |
60 | 60 | */ |
61 | 61 | function current_time( $type, $gmt = 0 ) { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | * @since 2.0.5 |
437 | 437 | * |
438 | 438 | * @param string|array|object $data Data that might be serialized. |
439 | - * @return mixed A scalar data |
|
439 | + * @return string A scalar data |
|
440 | 440 | */ |
441 | 441 | function maybe_serialize( $data ) { |
442 | 442 | if ( is_array( $data ) || is_object( $data ) ) |
@@ -771,9 +771,6 @@ discard block |
||
771 | 771 | * |
772 | 772 | * @since 1.5.0 |
773 | 773 | * |
774 | - * @param string|array $key Either a query variable key, or an associative array of query variables. |
|
775 | - * @param string $value Optional. Either a query variable value, or a URL to act upon. |
|
776 | - * @param string $url Optional. A URL to act upon. |
|
777 | 774 | * @return string New URL query string (unescaped). |
778 | 775 | */ |
779 | 776 | function add_query_arg() { |
@@ -1428,7 +1425,7 @@ discard block |
||
1428 | 1425 | * @since 2.0.4 |
1429 | 1426 | * |
1430 | 1427 | * @param string $actionurl URL to add nonce action. |
1431 | - * @param int|string $action Optional. Nonce action name. Default -1. |
|
1428 | + * @param integer $action Optional. Nonce action name. Default -1. |
|
1432 | 1429 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
1433 | 1430 | * @return string Escaped URL with nonce action added. |
1434 | 1431 | */ |
@@ -1457,7 +1454,7 @@ discard block |
||
1457 | 1454 | * |
1458 | 1455 | * @since 2.0.4 |
1459 | 1456 | * |
1460 | - * @param int|string $action Optional. Action name. Default -1. |
|
1457 | + * @param integer $action Optional. Action name. Default -1. |
|
1461 | 1458 | * @param string $name Optional. Nonce name. Default '_wpnonce'. |
1462 | 1459 | * @param bool $referer Optional. Whether to set the referer field for validation. Default true. |
1463 | 1460 | * @param bool $echo Optional. Whether to display or return hidden form field. Default true. |
@@ -1549,7 +1546,7 @@ discard block |
||
1549 | 1546 | * |
1550 | 1547 | * @since 4.5.0 |
1551 | 1548 | * |
1552 | - * @return string|false Referer URL on success, false on failure. |
|
1549 | + * @return string Referer URL on success, false on failure. |
|
1553 | 1550 | */ |
1554 | 1551 | function wp_get_raw_referer() { |
1555 | 1552 | if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { |
@@ -1861,7 +1858,7 @@ discard block |
||
1861 | 1858 | * @param bool $create_dir Optional. Whether to check and create the uploads directory. |
1862 | 1859 | * Default true for backward compatibility. |
1863 | 1860 | * @param bool $refresh_cache Optional. Whether to refresh the cache. Default false. |
1864 | - * @return array See above for description. |
|
1861 | + * @return callable|null See above for description. |
|
1865 | 1862 | */ |
1866 | 1863 | function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false ) { |
1867 | 1864 | static $cache = array(), $tested_paths = array(); |
@@ -4692,7 +4689,7 @@ discard block |
||
4692 | 4689 | * |
4693 | 4690 | * @see __return_false() |
4694 | 4691 | * |
4695 | - * @return true True. |
|
4692 | + * @return boolean True. |
|
4696 | 4693 | */ |
4697 | 4694 | function __return_true() { |
4698 | 4695 | return true; |
@@ -4814,7 +4811,7 @@ discard block |
||
4814 | 4811 | * @param int $start The ID to start the loop check at. |
4815 | 4812 | * @param int $start_parent The parent_ID of $start to use instead of calling $callback( $start ). |
4816 | 4813 | * Use null to always use $callback |
4817 | - * @param array $callback_args Optional. Additional arguments to send to $callback. |
|
4814 | + * @param string[] $callback_args Optional. Additional arguments to send to $callback. |
|
4818 | 4815 | * @return array IDs of all members of loop. |
4819 | 4816 | */ |
4820 | 4817 | function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_args = array() ) { |
@@ -222,6 +222,10 @@ discard block |
||
222 | 222 | $this->replace_url_attributes = (array) $element_attribute; |
223 | 223 | } |
224 | 224 | |
225 | + /** |
|
226 | + * @param string $data |
|
227 | + * @param integer $type |
|
228 | + */ |
|
225 | 229 | public function sanitize($data, $type, $base = '') |
226 | 230 | { |
227 | 231 | $data = trim($data); |
@@ -381,6 +385,9 @@ discard block |
||
381 | 385 | return $data; |
382 | 386 | } |
383 | 387 | |
388 | + /** |
|
389 | + * @param string $html |
|
390 | + */ |
|
384 | 391 | protected function preprocess($html, $type) |
385 | 392 | { |
386 | 393 | $ret = ''; |
@@ -404,6 +411,9 @@ discard block |
||
404 | 411 | return $ret; |
405 | 412 | } |
406 | 413 | |
414 | + /** |
|
415 | + * @param DOMDocument $document |
|
416 | + */ |
|
407 | 417 | public function replace_urls($document, $tag, $attributes) |
408 | 418 | { |
409 | 419 | if (!is_array($attributes)) |
@@ -456,6 +466,9 @@ discard block |
||
456 | 466 | } |
457 | 467 | } |
458 | 468 | |
469 | + /** |
|
470 | + * @param DOMDocument $document |
|
471 | + */ |
|
459 | 472 | protected function strip_tag($tag, $document, $type) |
460 | 473 | { |
461 | 474 | $xpath = new DOMXPath($document); |
@@ -541,6 +554,9 @@ discard block |
||
541 | 554 | } |
542 | 555 | } |
543 | 556 | |
557 | + /** |
|
558 | + * @param DOMDocument $document |
|
559 | + */ |
|
544 | 560 | protected function strip_attr($attrib, $document) |
545 | 561 | { |
546 | 562 | $xpath = new DOMXPath($document); |
@@ -400,8 +400,8 @@ discard block |
||
400 | 400 | * |
401 | 401 | * @since 3.4.0 |
402 | 402 | * |
403 | - * @param mixed $ajax_message Ajax return |
|
404 | - * @param mixed $message UI message |
|
403 | + * @param integer $ajax_message Ajax return |
|
404 | + * @param string $message UI message |
|
405 | 405 | */ |
406 | 406 | protected function wp_die( $ajax_message, $message = null ) { |
407 | 407 | if ( $this->doing_ajax() ) { |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * @since 3.4.0 |
445 | 445 | * @deprecated 4.7.0 |
446 | 446 | * |
447 | - * @return callable Die handler. |
|
447 | + * @return string Die handler. |
|
448 | 448 | */ |
449 | 449 | public function wp_die_handler() { |
450 | 450 | _deprecated_function( __METHOD__, '4.7.0' ); |
@@ -4275,7 +4275,7 @@ discard block |
||
4275 | 4275 | * |
4276 | 4276 | * @param WP_Error $validity |
4277 | 4277 | * @param mixed $value |
4278 | - * @return mixed |
|
4278 | + * @return WP_Error |
|
4279 | 4279 | */ |
4280 | 4280 | public function _validate_header_video( $validity, $value ) { |
4281 | 4281 | $video = get_attached_file( absint( $value ) ); |
@@ -4307,7 +4307,7 @@ discard block |
||
4307 | 4307 | * |
4308 | 4308 | * @param WP_Error $validity |
4309 | 4309 | * @param mixed $value |
4310 | - * @return mixed |
|
4310 | + * @return WP_Error |
|
4311 | 4311 | */ |
4312 | 4312 | public function _validate_external_header_video( $validity, $value ) { |
4313 | 4313 | $video = esc_url_raw( $value ); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @access public |
99 | 99 | * |
100 | 100 | * @param SimplePie $data Data to save. |
101 | - * @return true Always true. |
|
101 | + * @return boolean Always true. |
|
102 | 102 | */ |
103 | 103 | public function save($data) { |
104 | 104 | if ( $data instanceof SimplePie ) { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | * @since 2.8.0 |
153 | 153 | * @access public |
154 | 154 | * |
155 | - * @return true Always true. |
|
155 | + * @return boolean Always true. |
|
156 | 156 | */ |
157 | 157 | public function unlink() { |
158 | 158 | delete_transient($this->name); |
@@ -145,7 +145,7 @@ |
||
145 | 145 | * @since 4.6.0 |
146 | 146 | * @access public |
147 | 147 | * |
148 | - * @return mixed Response data. |
|
148 | + * @return string Response data. |
|
149 | 149 | */ |
150 | 150 | public function get_data() { |
151 | 151 | return $this->response->body; |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | * @param int $dst_h The destination height. |
293 | 293 | * @param string $filter_name Optional. The Imagick filter to use when resizing. Default 'FILTER_TRIANGLE'. |
294 | 294 | * @param bool $strip_meta Optional. Strip all profiles, excluding color profiles, from the image. Default true. |
295 | - * @return bool|WP_Error |
|
295 | + * @return null|WP_Error |
|
296 | 296 | */ |
297 | 297 | protected function thumbnail_image( $dst_w, $dst_h, $filter_name = 'FILTER_TRIANGLE', $strip_meta = true ) { |
298 | 298 | $allowed_filters = array( |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | * @since 4.7.0 |
746 | 746 | * @access protected |
747 | 747 | * |
748 | - * @return string|WP_Error File to load or WP_Error on failure. |
|
748 | + * @return string File to load or WP_Error on failure. |
|
749 | 749 | */ |
750 | 750 | protected function pdf_setup() { |
751 | 751 | try { |